fortify/test/sandbox/assert.nix
Ophestra 07f1b92d80
All checks were successful
Test / Create distribution (push) Successful in 26s
Test / Fpkg (push) Successful in 34s
Test / Fortify (push) Successful in 39s
Test / Data race detector (push) Successful in 2m39s
Test / Flake checks (push) Successful in 1m5s
app: pass through $SHELL
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27 03:09:16 +09:00

31 lines
583 B
Nix

{
writeText,
buildGoModule,
pkg-config,
util-linux,
version,
}:
buildGoModule {
pname = "check-sandbox";
inherit version;
src = ../.;
vendorHash = null;
buildInputs = [ util-linux ];
nativeBuildInputs = [ pkg-config ];
preBuild = ''
go mod init git.gensokyo.uk/security/fortify/test >& /dev/null
cp ${writeText "main.go" ''
package main
import "os"
import "git.gensokyo.uk/security/fortify/test/sandbox"
func main() { (&sandbox.T{FS: os.DirFS("/")}).MustCheckFile(os.Args[1], "/tmp/sandbox-ok") }
''} main.go
'';
}