test: move test program to sandbox directory
This prepares for the separation of app and sandbox tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
30
test/sandbox/tool/package.nix
Normal file
30
test/sandbox/tool/package.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
pkg-config,
|
||||
util-linux,
|
||||
|
||||
version,
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "check-sandbox";
|
||||
inherit version;
|
||||
|
||||
src = builtins.path {
|
||||
name = "${pname}-src";
|
||||
path = lib.cleanSource ../.;
|
||||
filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
|
||||
};
|
||||
vendorHash = null;
|
||||
|
||||
buildInputs = [ util-linux ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
preBuild = ''
|
||||
go mod init git.gensokyo.uk/security/fortify/test/sandbox >& /dev/null
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/tool $out/bin/fortify-test
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user