2
0
Fork 0
genodepkgs/packages/solo5/default.nix

55 lines
1.3 KiB
Nix
Raw Normal View History

2020-04-02 13:33:41 +02:00
{ stdenv, buildPackages, fetchurl, solo5-tools }:
2019-10-06 20:35:54 +02:00
2020-01-27 11:59:09 +01:00
# WARNING: recursive make ahead
2020-10-19 01:16:06 +02:00
let version = "0.6.7";
2019-10-06 20:35:54 +02:00
in stdenv.mkDerivation {
pname = "solo5";
inherit version;
2020-04-02 13:33:41 +02:00
outputs = [ "out" "dev" "tests" ];
2019-10-06 20:35:54 +02:00
2020-04-02 13:33:41 +02:00
nativeBuildInputs = [ solo5-tools ];
2019-10-22 21:22:40 +02:00
2019-10-06 20:35:54 +02:00
src = fetchurl {
url =
"https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz";
2020-10-19 01:16:06 +02:00
sha256 = "05k9adg3440zk5baa6ry8z5dj8d8r8hvzafh2469pdgcnr6h45gr";
2019-10-06 20:35:54 +02:00
};
enableParallelBuilding = true;
2020-11-21 18:16:06 +01:00
patches = [
./genode.patch
./elftool.patch
./test_time.patch
./misleading-indentation.patch
];
2019-10-21 19:38:04 +02:00
configurePhase = with stdenv; ''
2019-10-21 13:06:35 +02:00
runHook preConfigure
2020-04-02 13:33:41 +02:00
sh configure.sh
${lib.optionalString (hostPlatform.isAarch64) "rm -fr tests/test_fpu"}
2019-10-21 19:38:04 +02:00
rm -fr tests/test_tls
2019-10-21 13:06:35 +02:00
runHook postConfigure
'';
2019-10-06 20:35:54 +02:00
installPhase = ''
2019-10-21 13:06:35 +02:00
runHook preInstall
2020-04-02 13:33:41 +02:00
install -Dt $out/lib bindings/genode/solo5.lib.so
mkdir $dev
cp -r include/solo5 $dev/include
2019-10-06 20:35:54 +02:00
for test in tests/*/*.genode; do
2020-04-02 13:33:41 +02:00
install -D $test $tests/bin/solo5-$(basename $test .genode)
2019-10-06 20:35:54 +02:00
done
2019-10-21 13:06:35 +02:00
runHook postInstall
2019-10-06 20:35:54 +02:00
'';
meta = with stdenv.lib; {
description = "Sandboxed execution environment.";
homepage = "https://github.com/solo5/solo5";
license = licenses.isc;
maintainers = [ maintainers.ehmry ];
};
}