Tool that generates Nix build instructions from a Cabal file. Also contains
hackage2nix, the tool that generates the haskellPackages
set in nixpkgs.
Utility library implementing nixpkgs-specific tasks and concepts: Looking
up packages, meta
sets, Nix-style integrity hashes etc.
Simplistic library to parse and render a subset of the Nix language.
Library for working with the Hackage database created and updated
using cabal update
.
At the top-level, a cabal.project
and shell.nix
are provided for working
on all packages in the repository. You can use direnv
and (optionally)
lorri to make the environment available in your normal shell as well.
The monorepo has been assembled using josh. You can obtain it from nixpkgs
using nix-shell -p josh
. Below, some common tasks are documented.
josh's history filtering capabilities are quite powerful, allowing us to
extract the original git histories of the repositories that have been vendored
in. For example, for distribution-nixpkgs
:
$ josh-filter ':/distribution-nixpkgs'
$ git checkout FILTERED_HEAD
$ ls *.cabal
distribution-nixpkgs.cabal
The FILTERED_HEAD
ref has the original HEAD
of the distribution-nixpkgs
HEAD
when it was vendored as its ancestor and can thus be pushed to the
original repository.
This probably won't come up in the future, but the process that was used to vendor the additional libraries is documented here:
$ name=β¦
$ git fetch https://github.com/nixos/$name.git
$ josh-filter ":prefix=$name" FETCH_HEAD
$ git merge --allow-unrelated-histories FILTERED_HEAD -m "$name: subtree upstream repo"
Also refer to the relevant josh documentation.