1 { lib, stdenv, fetchurl, dosfstools, libseccomp, makeWrapper, mtools, parted
2 , pkg-config, qemu_test, 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-J1xcL/AdcLQ7Ph3TFwEaS9l4cWjDQsTaXTdBDcT7p6E=";
27 hardeningEnable = [ "pie" ];
31 sh configure.sh --prefix=/
35 enableParallelBuilding = true;
37 separateDebugInfo = true;
38 # debugging requires information for both the unikernel and the tender
46 substituteInPlace $out/bin/solo5-virtio-mkimage \
47 --replace "/usr/lib/syslinux" "${syslinux}/share/syslinux" \
48 --replace "/usr/share/syslinux" "${syslinux}/share/syslinux" \
49 --replace "cp " "cp --no-preserve=mode "
51 wrapProgram $out/bin/solo5-virtio-mkimage \
52 --prefix PATH : ${lib.makeBinPath [ dosfstools mtools parted syslinux ]}
57 doCheck = stdenv.hostPlatform.isLinux;
58 nativeCheckInputs = [ util-linux qemu_test ];
62 substituteInPlace scripts/virtio-run/solo5-virtio-run.sh \
63 --replace " -no-acpi" ""
64 ./tests/bats-core/bats ./tests/tests.bats
69 description = "Sandboxed execution environment";
70 homepage = "https://github.com/solo5/solo5";
71 license = licenses.isc;
72 maintainers = [ maintainers.ehmry ];
73 platforms = mapCartesianProduct ({ arch, os }: "${arch}-${os}") {
74 arch = [ "aarch64" "x86_64" ];
75 os = [ "freebsd" "genode" "linux" "openbsd" ];