[Nix-dev] reimplementation of nukeReferences - when to commit?

Eelco Dolstra e.dolstra at tudelft.nl
Fri Nov 14 11:12:22 CET 2008


Marc Weber wrote:

> How much would have to be rebuild when using this reimplementation of
> nukeReferences ?

Well, you could just try :-)  If it rebuilds too much, please commit it in the
stdenv-branch.

>         nukeReferences = writeTextFile {
>           name = "nuke-references"; executable = true; destination = "/bin/nuke-refs";
>           text = ''
>               #! $SHELL -e
>               exec sed -i 's|/nix/store/[a-z0-9]\{32\}-|/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g' "$@" '';
>         };

Looks good.  Please put the closing '' on the next line, i.e.

  text = ''
    bla bla
  '';

BTW, it might be nice to have a function writeShellScript that automatically
sets "executable = true;" and adds the "#! $SHELL -e" line.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list