aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/seccomp.nix
blob: 3cf9b582340a4c7c07e695117b95da143d3b69d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  writeText,
  buildGoModule,

  version,
}:
let
  mainFile = writeText "main.go" ''
    package main

    import "git.gensokyo.uk/security/fortify/test/sandbox"

    func main() { sandbox.MustAssertSeccomp() }
  '';
in
buildGoModule {
  pname = "check-seccomp";
  inherit version;

  src = ../.;
  vendorHash = null;

  preBuild = ''
    go mod init git.gensokyo.uk/security/fortify/test >& /dev/null
    cp ${mainFile} main.go
  '';
}