[Nix-dev] A Journey into our brand-new Haskell infrastructure: Part III

Peter Simons simons at cryp.to
Mon Apr 27 13:40:08 CEST 2015


Hi folks,

just a quick update for your information: we now have fully automatic updates
of "hackages-packages.nix". The process is driven by the "update-nixpkgs.sh"
script [1], which is part of the cabal2nix Git repository [2]. Basically, that
script re-generates hackages-packages.nix once per hour from the current state
of Hackage (which [3] tracks in a Git repository) and pushes the result to [4].
>From there, Hydra [5] picks up the new version and builds everything.

We do not merge those updates to 'master' automatically, though. Instead, a
human being can decide to do that by choosing a relatively stable version of
Hackage from [5] and merging revision into 'master'. Personally, I like to
squash all those commits into one by running

  $ git checkout master && git pull
  $ git checkout haskell-updates && git pull
  $ git rebase -i master

Now select "squash" for all but the first commit, and when Git asks you to edit
the final commit message, make sure to chose the *last one*. Then push the
result to the origin repository:

  $ git push -v origin haskell-updates:master

Note that the commit messages for "hackage-packages.nix" allow us to re-produce
that particular state at any point in time. It says

  hackage-packages.nix: update to
  https://github.com/commercialhaskell/all-cabal-files/commit/30bfb9f7 with
  hackage2nix revision 0d459262

where the first URL identifies the state of Hackage this file was built from,
and the second revision identifies the state of "hackage2nix" that generated
the file.

Best regards,
Peter


[1] https://github.com/NixOS/cabal2nix/blob/master/update-nixpkgs.sh
[2] https://github.com/NixOS/cabal2nix
[3] https://github.com/commercialhaskell/all-cabal-files
[4] https://github.com/peti/nixpkgs/tree/haskell-updates
[5] http://hydra.cryp.to/jobset/nixpkgs/haskell-updates



More information about the nix-dev mailing list