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

Ludovic Courtès ludo at gnu.org
Sun Oct 30 02:22:08 CEST 2011


ludo at gnu.org (Ludovic Courtès) skribis:

>   haskellPackages = import (stdenv.mkDerivation {
>     name = "haskell-packages";
>     src = http://haskell.org/.../;
>     buildInputs = [ cabal2nix ];
>     buildPhase = "cabal2nix $src";
>     installPhase = "ensureDir $out && mv *.nix $out";
>   }) { inherit ghc ... ; };
>
> The fact that ‘import’ can take a computed path such as the output path
> of a derivation allows for all sorts of crazy things.

But as Eelco said, it’s unfriendly to ‘nix-env -q’...

Ludo’.



More information about the nix-dev mailing list