<commit_before>{ stdenv
, fetchFromGitHub
, libseccomp
, perl
, which
}:

stdenv.mkDerivation rec {
  name    = "syscall_limiter-${version}";
  version = "20170123";

  src = fetchFromGitHub {
    owner  = "vi";
    repo   = "syscall_limiter";
    rev    = "481c8c883f2e1260ebc83b352b63bf61a930a341";
    sha256 = "0z5arj1kq1xczgrbw1b8m9kicbv3vs9bd32wvgfr4r6ndingsp5m";
  };

  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";<commit_msg>syscall_limiter: fix build<commit_after>{ stdenv
, fetchFromGitHub
, libseccomp
, perl
, which
}:

stdenv.mkDerivation rec {
  name    = "syscall_limiter-${version}";
  version = "2017-01-23";

  src = fetchFromGitHub {
    owner  = "vi";
    repo   = "syscall_limiter";
    rev    = "481c8c883f2e1260ebc83b352b63bf61a930a341";
    sha256 = "0z5arj1kq1xczgrbw1b8m9kicbv3vs9bd32wvgfr4r6ndingsp5m";
  };

  buildInputs = [ libseccomp ];

  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";
{'fraction_non_alphanumeric': 0.12331180270111568, 'fraction_numerical': 0.061068702290076333, 'mean_word_length': 3.3469387755102042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3625900', 'n_tokens_mistral': 738, 'n_tokens_neox': 652, 'n_words': 117}