1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 11:02:05 +00:00

* Turn the nukeRefs() function into a separate program.

svn path=/nixpkgs/trunk/; revision=6941
This commit is contained in:
Eelco Dolstra 2006-11-03 13:33:24 +00:00
parent d0a18cf8fa
commit 609607768f
3 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,12 @@
source $stdenv/setup
ensureDir $out/bin
cat > $out/bin/nuke-refs <<EOF
#! $SHELL -e
for i in \$*; do
cat \$i | sed "s|/nix/store/[a-z0-9]*-|/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > \$i.tmp
if test -x \$i; then chmod +x \$i.tmp; fi
mv \$i.tmp \$i
done
EOF
chmod +x $out/bin/nuke-refs

View file

@ -0,0 +1,11 @@
# The program `nuke-refs' created by this derivation replaces all
# references to the Nix store in the specified files by a non-existant
# path (/nix/store/eeee...). This is useful for getting rid of
# dependencies that you know are not actually needed at runtime.
{stdenv}:
stdenv.mkDerivation {
name = "nuke-references";
builder = ./builder.sh;
}

View file

@ -192,6 +192,10 @@ rec {
inherit stdenv;
};
nukeReferences = import ../build-support/nuke-references/default.nix {
inherit stdenv;
};
### TOOLS