From 6b852ab38f7a0cca287b873f35e51de57de9a86c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Apr 2008 06:37:59 +0000 Subject: [PATCH] * Optionally install extra RPMs before doing the build. svn path=/nixpkgs/trunk/; revision=11500 --- pkgs/build-support/vm/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 286bfb6b38a8..dfbabcdb2d0a 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -366,9 +366,15 @@ rec { tarball must contain an RPM specfile. */ buildRPM = attrs: runInLinuxImage (stdenv.mkDerivation ({ - phases = "sysInfoPhase buildPhase installPhase"; + phases = "prepareImagePhase sysInfoPhase buildPhase installPhase"; outDir = "rpms/${attrs.diskImage.name}"; + + prepareImagePhase = '' + for rpm in $extraRPMs; do + rpm -iv $rpm + done + ''; sysInfoPhase = '' header "base RPMs"