core/pkgs/build-support/vm/test.nix

59 lines
1.1 KiB
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
let
pkgs = import ../../.. { };
inherit (pkgs)
hello
patchelf
pcmanfm
stdenv
;
inherit (pkgs.vmTools)
buildRPM
diskImages
makeImageTestScript
runInLinuxImage
runInLinuxVM
;
in
{
# Run the PatchELF derivation in a VM.
buildPatchelfInVM = runInLinuxVM patchelf;
buildHelloInVM = runInLinuxVM hello;
2024-06-30 08:16:52 +00:00
buildPcmanrmInVM = runInLinuxVM (
pcmanfm.overrideAttrs (old: {
# goes out-of-memory with many cores
enableParallelBuilding = false;
})
);
2024-05-02 00:46:19 +00:00
testRPMImage = makeImageTestScript diskImages.fedora27x86_64;
buildPatchelfRPM = buildRPM {
name = "patchelf-rpm";
src = patchelf.src;
diskImage = diskImages.fedora27x86_64;
diskImageFormat = "qcow2";
};
testUbuntuImage = makeImageTestScript diskImages.ubuntu1804i386;
2024-06-30 08:16:52 +00:00
buildInDebian = runInLinuxImage (
stdenv.mkDerivation {
name = "deb-compile";
src = patchelf.src;
diskImage = diskImages.ubuntu1804i386;
diskImageFormat = "qcow2";
memSize = 512;
postHook = ''
dpkg-query --list
'';
}
);
2024-05-02 00:46:19 +00:00
}