Merge pull request #12160 from obadz/syscall_limiter

syscall_limiter: init at b02c03
This commit is contained in:
Eelco Dolstra 2016-01-05 16:52:02 +01:00
commit 49f46d58bb
2 changed files with 45 additions and 0 deletions

@ -0,0 +1,43 @@
{ stdenv
, fetchFromGitHub
, libseccomp
, perl
, which
}:
stdenv.mkDerivation rec {
name = "syscall_limiter-${version}";
version = "${date}-${stdenv.lib.strings.substring 0 7 rev}";
date = "20160105";
rev = "b02c0316a2aaff496f712f1467e20337006655cc";
src = fetchFromGitHub {
owner = "vi";
repo = "syscall_limiter";
inherit rev;
sha256 = "14q5k5c8hk7gnxhgwaamwbibasb3pwj6jnqsxa1bdp16n6jdajxd";
};
configurePhase = "";
buildPhase = ''
make CC="gcc -I${libseccomp}/include -L${libseccomp}/lib"
'';
installPhase = ''
mkdir -p $out/bin
cp -v limit_syscalls $out/bin
cp -v monitor.sh $out/bin/limit_syscalls_monitor.sh
substituteInPlace $out/bin/limit_syscalls_monitor.sh \
--replace perl ${perl}/bin/perl \
--replace which ${which}/bin/which
'';
meta = with stdenv.lib; {
description = "Start Linux programs with only selected syscalls enabled";
homepage = https://github.com/vi/syscall_limiter;
license = licenses.mit;
maintainers = with maintainers; [ obadz ];
platforms = platforms.linux;
};
}

@ -897,6 +897,8 @@ let
pynotify = pythonPackages.notify;
};
syscall_limiter = callPackage ../os-specific/linux/syscall_limiter {};
syslogng = callPackage ../tools/system/syslog-ng { };
syslogng_incubator = callPackage ../tools/system/syslog-ng-incubator { };