[Nix-dev] NiJS package manager

Max Ivanov ivanov.maxim at gmail.com
Tue Apr 1 13:59:45 CEST 2014


> I would certainly be keen to see a switch from a central nixpkgs repo to a
> system whereby the nix expression comes with the package itself. Yes,
> lots of details to figure out there, but I think it's preferable for a
> number of reasons. Then, obviously, there are central servers where this
> data is held.

I've been experimenting with nix to improve inhouse software
buidability. The idea is to hame "something.nix" in source tree which
is nothing more than single top level mkDerivation call with src =
"./.". All inhouse dependencies are simple submodules and their
expressions are imported using relative paths and then listed in
buildInputs. The fact that dependencies are not some identification
strings with optional versions like in deb or rpm, but whole
derivation is Nix killer feature. So together with in tree .nix files
it makes it unnecessary to maintain separate registry of packages,
dependency locking is done implicitly (from Nix point of view) by git
submodules. That means onybody can jump into the code, hack in any
incompatible way and push it without worrying that it can break
somebody's code.

And as a bonus, there is zero time to setup dev environment, any
newcomer just checks out project, runs ./dev-shell which first
installs nix from git.io/nix-install.sh and then runs nix-shell on
"something.nix". And that is it. All compilers, libraries, headers,
test data files and whatever else is needed is ready with no
additional effort of maintaining docker/vargrant/whatever VMs just to
do development.

To assure rebuildability in the future, whole nixpgs is submodulled too.


More information about the nix-dev mailing list