[Nix-dev] Dynamic Dependency Management by Calling External Programs from Nix

Marc Weber marco-oweber at gmx.de
Sun Oct 30 00:38:01 CEST 2011


Excerpts from ludo's message of Sat Oct 29 22:56:48 +0200 2011:
>   haskellPackages = import (stdenv.mkDerivation {

Looks pretty similar to my sample headlined by:
 == building darcs sample ==

Difference: That time I didn't know that it was already possible.

I got another idea about cpan/...
What about *allowing netork access* but only to servers we can control?

Eg we could sync cpan/ruby forge/... once every X days. And within
derivations we could do:

perlPackages = targetPackges: import (mkDerivation (){
  snapshotFrom = "2011-XX-YY";
  buildDependencyTreeFor = targetPackges;
})+"/default.nix"

mechanize = perlPackages.mechanize

So basically its like having "local dump" of mechanize without
downloading it. By using "snapshots" of it we could freeze updates.
Thus hashes can be controlled more easily. Without snapshotting they may
change far too often.

I feel almost fine with having a central server sync all packages.
I don't feel too comfortable having the complete dump on disk on each
computer (although it would get the job done - it would be a waste of
disk space)

Yet there is another issue: hack-nix also provides a "patch phase".
Before dumping the hackage tarball providing info about all packages the
database can be patched.

Marc Weber


More information about the nix-dev mailing list