2017-10-22 00:13:11 +02:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, pkgconfig, libtool
|
|
|
|
, bison, flex, libnl, protobuf, protobufc }:
|
2015-08-10 19:34:09 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-10-22 00:13:11 +02:00
|
|
|
name = "nsjail-${version}";
|
2017-11-04 20:02:23 +01:00
|
|
|
version = "2.2";
|
2015-08-10 19:34:09 +02:00
|
|
|
|
2017-10-22 00:13:11 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "nsjail";
|
|
|
|
rev = version;
|
|
|
|
fetchSubmodules = true;
|
2017-11-04 20:02:23 +01:00
|
|
|
sha256 = "11323j5wd02nm8ibvzbzq7dla70bmcldc71lv5bpk4x7h64ai14v";
|
2015-08-10 19:34:09 +02:00
|
|
|
};
|
|
|
|
|
2017-10-22 00:13:11 +02:00
|
|
|
nativeBuildInputs = [ autoconf libtool pkgconfig ];
|
|
|
|
buildInputs = [ bison flex libnl protobuf protobufc ];
|
2017-11-04 20:02:23 +01:00
|
|
|
enableParallelBuilding = true;
|
2017-10-22 00:13:11 +02:00
|
|
|
|
2015-08-10 19:34:09 +02:00
|
|
|
installPhase = ''
|
2017-11-04 20:02:23 +01:00
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
|
|
install nsjail $out/bin/
|
|
|
|
install nsjail.1 $out/share/man/man1/
|
2015-08-10 19:34:09 +02:00
|
|
|
'';
|
|
|
|
|
2017-10-22 00:13:11 +02: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/;
|
2017-11-04 20:02:23 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bosu c0bw3b ];
|
2017-10-22 00:13:11 +02:00
|
|
|
platforms = platforms.linux;
|
2015-08-10 19:34:09 +02:00
|
|
|
};
|
|
|
|
}
|