Factor out repeated scriptlets from build-support/release/*.nix.

This commit is contained in:
Petr Rockai
2012-07-23 20:33:04 +02:00
committed by Peter Simons
parent 1eb5450bd4
commit ce77a5ceec
6 changed files with 27 additions and 40 deletions
+4 -11
View File
@@ -30,17 +30,10 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
# !!! cut&paste from rpm-build.nix
postHook = ''
mkdir -p $out/nix-support
cat "$diskImage"/nix-support/full-name > $out/nix-support/full-name
# If `src' is the result of a call to `makeSourceTarball', then it
# has a subdirectory containing the actual tarball(s). If there are
# multiple tarballs, just pick the first one.
echo $src
if test -d $src/tarballs; then
src=$(ls $src/tarballs/*.tar.bz2 $src/tarballs/*.tar.gz | sort | head -1)
fi
''; # */
. ${./functions.sh}
propagateImageName
src=$(findTarballs $src | head -1) # Find a tarball.
'';
installExtraDebsPhase = ''
for i in $extraDebs; do