2019-10-06 20:35:54 +02:00
|
|
|
# SPDX-FileCopyrightText: Emery Hemingway
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
|
|
|
|
|
2019-11-19 16:36:52 +01:00
|
|
|
{ stdenv, buildPackages, fetchurl, llvmPackages, pkgconfig, base, os }:
|
2019-10-06 20:35:54 +02:00
|
|
|
|
2020-01-10 10:08:24 +01:00
|
|
|
# WARNING: recursive make, fucked as usual
|
|
|
|
|
2019-10-21 16:34:19 +02:00
|
|
|
let version = "0.6.3";
|
2019-10-06 20:35:54 +02:00
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "solo5";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
outputs = [ "out" "tests" ];
|
|
|
|
|
2019-10-22 21:22:40 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
2020-01-10 10:08:24 +01:00
|
|
|
buildInputs = [ base os ];
|
2019-10-22 21:22:40 +02:00
|
|
|
|
2019-10-06 20:35:54 +02:00
|
|
|
src = fetchurl {
|
2020-01-10 10:08:24 +01:00
|
|
|
url =
|
|
|
|
"https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz";
|
2019-10-21 16:34:19 +02:00
|
|
|
sha256 = "08z2gv0jlsq6r92vacapdj0hqhyfqfy3xdjn5k9c1pd23a2syq7w";
|
2019-10-06 20:35:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2019-10-21 19:38:04 +02:00
|
|
|
patches = [ ./genode.patch ];
|
|
|
|
|
2019-10-21 13:06:35 +02:00
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
2019-10-21 19:38:04 +02:00
|
|
|
rm -fr tests/test_tls
|
2019-10-21 13:06:35 +02:00
|
|
|
HOSTCC=${buildPackages.stdenv.cc}/bin/cc sh configure.sh
|
|
|
|
runHook postConfigure
|
|
|
|
'';
|
2019-10-06 20:35:54 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-10-21 13:06:35 +02:00
|
|
|
runHook preInstall
|
2019-10-06 20:35:54 +02:00
|
|
|
mkdir -p $out/bin $tests/bin
|
|
|
|
make install-opam-genode PREFIX=$out
|
2020-01-10 10:08:24 +01:00
|
|
|
local wrong_path=`find $NIX_BUILD_TOP -name solo5.lib.so`
|
2019-10-06 20:35:54 +02:00
|
|
|
for test in tests/*/*.genode; do
|
|
|
|
cp $test $tests/bin/solo5-`basename $test .genode`
|
|
|
|
done
|
2019-10-21 13:06:35 +02:00
|
|
|
runHook postInstall
|
2019-10-06 20:35:54 +02:00
|
|
|
'';
|
|
|
|
|
2020-01-10 10:08:24 +01:00
|
|
|
dontFixup = true;
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|