2024-04-21 15:54:59 +00:00
|
|
|
let
|
|
|
|
pkgs = import ../../.. { };
|
|
|
|
|
|
|
|
inherit (pkgs)
|
|
|
|
hello
|
|
|
|
patchelf
|
|
|
|
pcmanfm
|
|
|
|
stdenv
|
|
|
|
;
|
|
|
|
|
|
|
|
inherit (pkgs.vmTools)
|
|
|
|
buildRPM
|
|
|
|
diskImages
|
|
|
|
makeImageTestScript
|
|
|
|
runInLinuxImage
|
|
|
|
runInLinuxVM
|
|
|
|
;
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
# Run the PatchELF derivation in a VM.
|
|
|
|
buildPatchelfInVM = runInLinuxVM patchelf;
|
|
|
|
|
|
|
|
buildHelloInVM = runInLinuxVM hello;
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
buildPcmanrmInVM = runInLinuxVM (pcmanfm.overrideAttrs (old: {
|
|
|
|
# goes out-of-memory with many cores
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
}));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
testRPMImage = makeImageTestScript diskImages.fedora27x86_64;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
buildPatchelfRPM = buildRPM {
|
|
|
|
name = "patchelf-rpm";
|
|
|
|
src = patchelf.src;
|
2022-01-03 16:56:52 +00:00
|
|
|
diskImage = diskImages.fedora27x86_64;
|
|
|
|
diskImageFormat = "qcow2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
testUbuntuImage = makeImageTestScript diskImages.ubuntu1804i386;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
buildInDebian = runInLinuxImage (stdenv.mkDerivation {
|
|
|
|
name = "deb-compile";
|
|
|
|
src = patchelf.src;
|
2021-12-06 16:07:01 +00:00
|
|
|
diskImage = diskImages.ubuntu1804i386;
|
|
|
|
diskImageFormat = "qcow2";
|
2020-04-24 23:36:52 +00:00
|
|
|
memSize = 512;
|
2021-12-06 16:07:01 +00:00
|
|
|
postHook = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
dpkg-query --list
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|