mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
* buildRPM: print out the RPMs in the image.
svn path=/nixpkgs/trunk/; revision=11168
This commit is contained in:
parent
195c3788ed
commit
113fafd778
@ -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.
|
@ -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
|
||||
'';
|
||||
});
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user