hibernate: Fix impurities.

svn path=/nixpkgs/trunk/; revision=11445
This commit is contained in:
Ludovic Courtès
2008-04-01 17:31:31 +00:00
parent bd9b19c180
commit 9231ea99d9
2 changed files with 50 additions and 1 deletions
+13 -1
View File
@@ -9,13 +9,25 @@ in
sha256 = "1xpc2i16jczc3nhvxlkn6fb044srqrh528gnp92cwy4hxf2nzi1z";
};
patches = [ ./install.patch ./gen-manpages.patch ];
patches = [ ./install.patch ./gen-manpages.patch ./hibernate.patch ];
buildInputs = [ gawk ];
installPhase = ''
# FIXME: Storing config files under `$out/etc' is not very useful.
substituteInPlace "hibernate.sh" --replace \
'SWSUSP_D="/etc/hibernate"' "SWSUSP_D=\"$out/etc/hibernate\""
# Remove all references to `/bin' and `/sbin'.
for i in scriptlets.d/*
do
substituteInPlace "$i" --replace "/bin/" "" --replace "/sbin/" ""
done
PREFIX="$out" CONFIG_PREFIX="$out" ./install.sh
ln -s "$out/share/hibernate/scriptlets.d" "$out/etc/hibernate"
'';
meta = {