1 { lib, stdenv, fetchurl, dosfstools, libseccomp, makeWrapper, mtools, parted
2 , pkg-config, qemu, syslinux, util-linux }:
6 # list of all theoretically available targets
15 in stdenv.mkDerivation {
19 nativeBuildInputs = [ makeWrapper pkg-config ];
20 buildInputs = lib.optional (stdenv.hostPlatform.isLinux) libseccomp;
23 url = "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz";
24 sha256 = "sha256-ovDdaS2cDufe5gTgi+t2C8waWiRC40/2flLLJlz+NvU=";
27 hardeningEnable = [ "pie" ];
31 sh configure.sh --prefix=/
35 enableParallelBuilding = true;
43 substituteInPlace $out/bin/solo5-virtio-mkimage \
44 --replace "/usr/lib/syslinux" "${syslinux}/share/syslinux" \
45 --replace "/usr/share/syslinux" "${syslinux}/share/syslinux" \
46 --replace "cp " "cp --no-preserve=mode "
48 wrapProgram $out/bin/solo5-virtio-mkimage \
49 --prefix PATH : ${lib.makeBinPath [ dosfstools mtools parted syslinux ]}
54 doCheck = stdenv.hostPlatform.isLinux;
55 checkInputs = [ util-linux qemu ];
59 ./tests/bats-core/bats ./tests/tests.bats
64 description = "Sandboxed execution environment";
65 homepage = "https://github.com/solo5/solo5";
66 license = licenses.isc;
67 maintainers = [ maintainers.ehmry ];
68 platforms = builtins.map ({arch, os}: "${arch}-${os}")
69 (cartesianProductOfSets {
70 arch = [ "aarch64" "x86_64" ];
71 os = [ "freebsd" "genode" "linux" "openbsd" ];