On Fri, Nov 14, 2008 at 11:12:22AM +0100, Eelco Dolstra wrote:
> 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.
We arleady have dozens of them.. That's why I've written *one* Because I
had a use case which wasn't covered by all those..
You can look them up beneath writeTextFile.
But it would be fun to save compilation time of packages so that you
could estimate recopmilation time in when doing such a change.. :-)
(don't have time to implement that.. just dreaming.)
Marc
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev