Updating nixpkgs packages since 2018
Go to file
2018-12-23 16:14:33 -08:00
src use -Wall and fix all warnings 2018-12-23 16:14:33 -08:00
test fix formatting of doctests 2018-04-06 17:41:14 +02:00
.gitattributes add clean & smudge filter 2018-04-06 17:36:52 +02:00
.gitignore use -Wall and fix all warnings 2018-12-23 16:14:33 -08:00
.hindent.yaml add clean & smudge filter 2018-04-06 17:36:52 +02:00
.travis.yml don't build in travis container 2018-04-08 07:26:56 -07:00
LICENSE change license to public domain, move old stuff into old directory 2018-02-26 06:31:48 -08:00
package.yaml use -Wall and fix all warnings 2018-12-23 16:14:33 -08:00
README.md Add description and features to README 2018-11-17 15:44:29 -08:00

nixpkgs-update

Build Status

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-prefetch-url 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 GitHub. 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 and build the tool:
    git clone https://github.com/ryantm/nixpkgs-update && cd nixpkgs-update
    nix run nixpkgs.haskellPackages.hpack -c hpack && nix run nixpkgs.cabal2nix -c cabal2nix --shell . > shell.nix && nix-build shell.nix
    
  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 -f '<nixpkgs>' gitAndTools.hub gist jq tree -c result/bin/nixpkgs-update --update

Prior work