2
0
Fork 0
genodepkgs/solo5/default.nix

41 lines
1022 B
Nix

# SPDX-FileCopyrightText: Emery Hemingway
#
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
{ stdenv, buildPackages, fetchurl, llvmPackages }:
let version = "0.6.2";
in stdenv.mkDerivation {
pname = "solo5";
inherit version;
outputs = [ "out" "tests" ];
src = fetchurl {
url = "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz";
sha256 = "0wi836wzv41carkxh16ajq2gzg65ns622byyibfc5ii8lvzww0ri";
};
patches = [ ./genode.patch ];
enableParallelBuilding = true;
configurePhase = "HOSTCC=${buildPackages.stdenv.cc}/bin/cc sh configure.sh";
installPhase = ''
mkdir -p $out/bin $tests/bin
make install-opam-genode PREFIX=$out
for test in tests/*/*.genode; do
cp $test $tests/bin/solo5-`basename $test .genode`
done
'';
meta = with stdenv.lib; {
description = "Sandboxed execution environment.";
homepage = "https://github.com/solo5/solo5";
license = licenses.isc;
maintainers = [ maintainers.ehmry ];
};
}