diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-03-17 17:29:07 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2008-03-17 17:29:07 +0000 |
commit | 113fafd7780bc1208925d3087725978abb7370c6 (patch) | |
tree | 95c6358513ecc30c41f991ae6270ea60fb7d7009 /pkgs/build-support | |
parent | 195c3788ed80b2b54297bd679516729d7eb6415a (diff) | |
download | nixlib-113fafd7780bc1208925d3087725978abb7370c6.tar nixlib-113fafd7780bc1208925d3087725978abb7370c6.tar.gz nixlib-113fafd7780bc1208925d3087725978abb7370c6.tar.bz2 nixlib-113fafd7780bc1208925d3087725978abb7370c6.tar.lz nixlib-113fafd7780bc1208925d3087725978abb7370c6.tar.xz nixlib-113fafd7780bc1208925d3087725978abb7370c6.tar.zst nixlib-113fafd7780bc1208925d3087725978abb7370c6.zip |
* buildRPM: print out the RPMs in the image.
svn path=/nixpkgs/trunk/; revision=11168
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/vm/default.nix (renamed from pkgs/build-support/vm/vm.nix) | 15 | ||||
-rw-r--r-- | pkgs/build-support/vm/test.nix | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/build-support/vm/vm.nix b/pkgs/build-support/vm/default.nix index 13b9ed5ea756..7d334f045409 100644 --- a/pkgs/build-support/vm/vm.nix +++ b/pkgs/build-support/vm/default.nix @@ -1,4 +1,6 @@ -with import ../../.. {}; +{pkgs}: + +with pkgs; rec { @@ -279,8 +281,11 @@ rec { postHook = '' PATH=/usr/bin:/bin:/usr/sbin:/sbin SHELL=/bin/sh + eval "$origPostHook" ''; + origPostHook = if attrs ? postHook then attrs.postHook else ""; + /* Don't run Nix-specific build steps like patchelf. */ fixupPhase = "true"; }); @@ -354,8 +359,14 @@ rec { tarball must contain an RPM specfile. */ buildRPM = attrs: runInLinuxImage (stdenv.mkDerivation (attrs // { - phases = "buildPhase installPhase"; + phases = "sysInfoPhase buildPhase installPhase"; + sysInfoPhase = '' + header "base RPMs" + rpm -qa --qf "%{Name}-%{Version}-%{Release} (%{Arch}; %{Distribution}; %{Vendor})\n" + stopNest + ''; + buildPhase = '' # Hacky: RPM looks for <basename>.spec inside the tarball, so # strip off the hash. diff --git a/pkgs/build-support/vm/test.nix b/pkgs/build-support/vm/test.nix index e25704612dcc..6c25667a222b 100644 --- a/pkgs/build-support/vm/test.nix +++ b/pkgs/build-support/vm/test.nix @@ -1,5 +1,5 @@ with import ../../.. {}; -with import ./vm.nix; +with vmTools; rec { @@ -50,6 +50,10 @@ rec { src = nixUnstable.src; diskImage = debianImage; memSize = 512; + phases = "sysInfoPhase unpackPhase patchPhase configurePhase buildPhase checkPhase installPhase fixupPhase distPhase"; + sysInfoPhase = '' + dpkg-query --list + ''; }); |