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/
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev