Giter Site home page Giter Site logo

pombredanne / nixpkgs-update Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryantm/nixpkgs-update

0.0 2.0 0.0 357 KB

Semi-automatically updating nixpkgs packages since 2018

License: Creative Commons Zero v1.0 Universal

Nix 2.85% Haskell 97.15%

nixpkgs-update's Introduction

nixpkgs-update

Build Status Patreon

The future is here; let's evenly distribute it!

Introduction

nixpkgs-update is the code used by @r-ryantm to semi-automatically update nixpkgs. It uses package repository information from Repology.org to generate a list of outdated packages. A package is considered "outdated" if a newer version of the package is available at any other repository tracked by Repology. nixpkgs-update tries to update each package in the dumbest way that could work. It find-replaces the old version number with the new one, uses nix-build to try to get the new hash, then tries to build the package. If it succeeds, it checks the outputs and makes a pull request. It also uploads the built package to Cachix, which people can use to manually test the package without building it themselves.

nixpkgs-update features

Checks

A number of checks are performed to help nixpkgs maintainers gauge the liklihood that an update was successful. All the binaries are run with various flags to see if they have a zero exit code and output the new version number. The outpath directory tree is searched for files containing the new version number. A directory tree and disk usage listing is provided.

Rebuild reports

The PRs made by nixpkgs-update say what packages need to be rebuilt if the pull request is merged. This uses the same mechanism OfBorg uses to put rebuild labels on PRs. Not limited by labels, it can report the exact number of rebuilds and list some of the attrpaths that would need to be rebuilt.

PRs against staging

If a PR merge would cause more than 100 packages to be rebuilt, the PR is made against staging.

Logs

Logs from r-ryantm's runs are available on Discourse. There are a lot of packages nixpkgs-update currently has no hope of updating. Please dredge the logs to find out why your pet package is not receiving updates.

Cachix

By uploading the build outputs to Cachix, nixpkgs-update allows you to test a package with one command.

Instructions

  1. Clone this repo:
    git clone https://github.com/ryantm/nixpkgs-update && cd nixpkgs-update
    
  2. Get a list of oudated packages and place them in a packages-to-update.txt file in the root directory of this repository.
    git clone https://github.com/ryantm/repology-api.git && cd repology-api
    nix run nixpkgs.cabal2nix -c cabal2nix --shell --hpack . > shell.nix && nix-build shell.nix && result/bin/repology-api > ../packages-to-update.txt
    
  3. Return back cd .. and run the tool nix run -c nixpkgs-update --update

Adding new dependencies / updating Cabal file

nix run nixpkgs.haskellPackages.hpack -c hpack && nix run nixpkgs.cabal2nix -c cabal2nix --hpack . > nixpkgs-update.nix

Development tips

Run a type checker in the background for quicker type checking feedback:

nix-shell --run ghcid

Prior work

nixpkgs-update's People

Contributors

bhipple avatar ekleog avatar jtojnar avatar matthewbauer avatar mic92 avatar ryantm avatar synthetica9 avatar tomberek avatar worldofpeace avatar yanalunaterra avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.