[Nix-dev] Want to build a package manager for OS X using Nix as its core

Marc Weber marco-oweber at gmx.de
Thu Nov 18 18:49:29 CET 2010


Excerpts from Tianyi Cui's message of Thu Nov 18 18:28:28 +0100 2010:
> I found another project related to Nix called Hack-Nix, which use Nix
> as a package manager for Haskell. So I think the answer to my first
> question should be "yes it's possible". Then my questions are:

hack-nix is writing .nix files which are then evaluated by standard nix*
toolset.

> * Where do I start? What should I read and learn?
learn about how the Nix tools work:

nix-instantiate -A nix $NIXPKGS_ALL
which prints its result, the recipe:
/nix/store/2v977kif0iswxzah23dnbdh8h5pjv8z6-nix-0.16.drv

its contents look like this:
Derive([("out","/nix/store/ialfjh5s54ndl1f8cvfqhxc0wznx60pm-nix-0.16","","")],[("/nix/store/39ldx5xaqs6vn15f0hk1kcz3d67gsbf3-perl-5.10.1.drv",["out"]),("/nix/store/94979aq8ars3kpzpvivbnag8k1cnssw3-stdenv-linux.drv",["out"]),("/nix/store/avhgyd5d34kx4z68wyvhlfcl1wzs9ad7-curl-7.21.0.drv",["out"]),  [... more characters omitted ]

It tells nix-store which dependencies to pass to the builder. You can
run the build by
nix-store --realise /nix/store/2v977kif0iswxzah23dnbdh8h5pjv8z6-nix-0.16.drv

By dropping the "functional nix" language you also drop all the work
which has gone into nixpkgs which is all the build recipes for all linux
packages.

Of course you can find ways to generate those .drv (derivation) files
yourself.

Marc Weber



More information about the nix-dev mailing list