diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 84222eca98bf..e466ff7ecce8 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -510,8 +510,7 @@ rec { tarball must contain an RPM specfile. */ buildRPM = attrs: runInLinuxImage (stdenv.mkDerivation ({ - prePhases = [ pkgs.prepareImagePhase pkgs.sysInfoPhase ]; - dontUnpack = true; + prePhases = [ "prepareImagePhase" "sysInfoPhase" ]; dontConfigure = true; outDir = "rpms/${attrs.diskImage.name}"; @@ -536,9 +535,7 @@ rec { buildPhase = '' eval "$preBuild" - # Hacky: RPM looks for .spec inside the tarball, so - # strip off the hash. - srcName="$(stripHash "$src")" + srcName="$(rpmspec --srpm -q --qf '%{source}' *.spec)" cp "$src" "$srcName" # `ln' doesn't work always work: RPM requires that the file is owned by root export HOME=/tmp/home diff --git a/pkgs/build-support/vm/test.nix b/pkgs/build-support/vm/test.nix index 384c92088083..ae6a10dea3b9 100644 --- a/pkgs/build-support/vm/test.nix +++ b/pkgs/build-support/vm/test.nix @@ -9,20 +9,23 @@ with vmTools; buildHelloInVM = runInLinuxVM hello; - buildPanInVM = runInLinuxVM pan; + buildPcmanrmInVM = runInLinuxVM (pcmanfm.overrideAttrs (old: { + # goes out-of-memory with many cores + enableParallelBuilding = false; + })); - - testRPMImage = makeImageTestScript diskImages.fedora16x86_64; + testRPMImage = makeImageTestScript diskImages.fedora27x86_64; buildPatchelfRPM = buildRPM { name = "patchelf-rpm"; src = patchelf.src; - diskImage = diskImages.fedora16x86_64; + diskImage = diskImages.fedora27x86_64; + diskImageFormat = "qcow2"; }; - testUbuntuImage = makeImageTestScript diskImages.ubuntu810i386; + testUbuntuImage = makeImageTestScript diskImages.ubuntu1804i386; buildInDebian = runInLinuxImage (stdenv.mkDerivation {