aboutsummaryrefslogtreecommitdiff
path: root/maintainers/check-syscalls.nix
blob: 1a3de5c6d5e4897ba4745e9844f93c13220d12a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  runCommandNoCC,
  lib,
  libseccomp,
  writeShellScriptBin,
}:
let
  syscalls-csv = runCommandNoCC "syscalls.csv" { } ''
    echo ${lib.escapeShellArg libseccomp.src}
    tar -xf ${lib.escapeShellArg libseccomp.src} --strip-components=2 ${libseccomp.name}/src/syscalls.csv
    mv syscalls.csv "$out"
  '';
in
writeShellScriptBin "check-syscalls" ''
  ${./check-syscalls.sh} ${syscalls-csv}
''