2017-10-21 23:13:11 +01:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, pkgconfig, libtool
|
|
|
|
, bison, flex, libnl, protobuf, protobufc }:
|
2015-08-10 18:34:09 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-10-21 23:13:11 +01:00
|
|
|
name = "nsjail-${version}";
|
|
|
|
version = "2.1";
|
2015-08-10 18:34:09 +01:00
|
|
|
|
2017-10-21 23:13:11 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "nsjail";
|
|
|
|
rev = version;
|
|
|
|
fetchSubmodules = true;
|
|
|
|
sha256 = "1wkhy86d0vgzngdvv593yhcghjh63chb8s67v891zll6bwgwg5h2";
|
2015-08-10 18:34:09 +01:00
|
|
|
};
|
|
|
|
|
2017-10-21 23:13:11 +01:00
|
|
|
nativeBuildInputs = [ autoconf libtool pkgconfig ];
|
|
|
|
buildInputs = [ bison flex libnl protobuf protobufc ];
|
|
|
|
|
2015-08-10 18:34:09 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp nsjail $out/bin
|
|
|
|
'';
|
|
|
|
|
2017-10-21 23:13:11 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A light-weight process isolation tool, making use of Linux namespaces and seccomp-bpf syscall filters";
|
|
|
|
homepage = http://nsjail.com/;
|
|
|
|
license = licenses.apsl20;
|
|
|
|
maintainers = [ maintainers.bosu ];
|
|
|
|
platforms = platforms.linux;
|
2015-08-10 18:34:09 +01:00
|
|
|
};
|
|
|
|
}
|