[Nix-dev] [Nix-commits] SVN commit: nix - r27832 - nix/trunk/src/libexpr

Shea Levy shea at shealevy.com
Mon Nov 7 05:56:24 CET 2011


Hi Eelco,

On 7/18/11 7:31 PM, Eelco Dolstra wrote:
>    This is not finished yet.  There is not yet an easy way to refer to
>    non-default outputs in Nix expressions.  Also, mutually recursive
>    outputs aren't detected yet and cause the garbage collector to
>    crash.
>

What do you mean by this? I'm able to realise the following 
mutually-recursive derivation:

Derive(
     [
         
("a","/home/play/nix/store/nc3qbsnpdzsvf323kj0vii8a1nwngjxy-test-a","",""),
         
("b","/home/play/nix/store/f53myqvkky80cj6jwpmgpnprf6b0dzgg-test-b","","")
     ],

     [
         
("/home/play/nix/store/ha2jlgwj66ckwpldkpgrgcivz4jf1h5l-bash-4.1-p2.drv",["out"]),
         
("/home/play/nix/store/m68s2p14av4fvlr05cvpvxdsk5wb293v-stdenv-linux.drv",["out"])
     ],

     
["/home/play/nix/store/544qg6w4jblc65cmnszvgd8x7qx69w2x-default-builder.sh"],

     "x86_64-linux",

     
"/home/play/nix/store/82yrivmzimdkpkbby78aj6mw2fz6k3h3-bash-4.1-p2/bin/bash",

     
["-e","/home/play/nix/store/544qg6w4jblc65cmnszvgd8x7qx69w2x-default-builder.sh"],

     [
         
("a","/home/play/nix/store/nc3qbsnpdzsvf323kj0vii8a1nwngjxy-test-a"),
         
("b","/home/play/nix/store/f53myqvkky80cj6jwpmgpnprf6b0dzgg-test-b"),
         ("buildInputs",""),
         ("buildNativeInputs",""),
         ("buildPhase","ensureDir $a\nensureDir $b\n\nln -sv $a $b/a\nln 
-sv $b $a/b\n"),
         
("builder","/home/play/nix/store/82yrivmzimdkpkbby78aj6mw2fz6k3h3-bash-4.1-p2/bin/bash"),
         ("name","test"),
         ("outputs","a b"),
         ("phases","buildPhase"),
         ("propagatedBuildInputs",""),
         ("propagatedBuildNativeInputs",""),
         
("stdenv","/home/play/nix/store/djb7s32fchkkiynsdx02p05s9d7dqmyn-stdenv-linux"),
         ("system","x86_64-linux")
     ]
)

And then I can detect the references:

$ nix-store -qR 
/home/play/nix/store/f53myqvkky80cj6jwpmgpnprf6b0dzgg-test-b/
/home/play/nix/store/nc3qbsnpdzsvf323kj0vii8a1nwngjxy-test-a
/home/play/nix/store/f53myqvkky80cj6jwpmgpnprf6b0dzgg-test-b

$ nix-store -qR 
/home/play/nix/store/nc3qbsnpdzsvf323kj0vii8a1nwngjxy-test-a/
/home/play/nix/store/nc3qbsnpdzsvf323kj0vii8a1nwngjxy-test-a
/home/play/nix/store/f53myqvkky80cj6jwpmgpnprf6b0dzgg-test-b

nix-store --delete/nix-collect-garbage segfaults when trying to remove 
either path, though.


More information about the nix-dev mailing list