* buildRPM: print out the RPMs in the image.

svn path=/nixpkgs/trunk/; revision=11168
This commit is contained in:
Eelco Dolstra 2008-03-17 17:29:07 +00:00
parent 195c3788ed
commit 113fafd778
3 changed files with 24 additions and 5 deletions

View file

@ -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.

View file

@ -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
'';
});

View file

@ -29,7 +29,7 @@
}:
rec {
let pkgs = rec {
### Symbolic names.
@ -392,6 +392,10 @@ rec {
nukeReferences = import ../build-support/nuke-references/default.nix {
inherit stdenv;
};
vmTools = import ../build-support/vm/default.nix {
inherit pkgs;
};
### TOOLS
@ -6160,4 +6164,4 @@ rec {
#my_env = import ../misc/my_env;
}
}; in pkgs