aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/tool/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'test/sandbox/tool/package.nix')
-rw-r--r--test/sandbox/tool/package.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/sandbox/tool/package.nix b/test/sandbox/tool/package.nix
new file mode 100644
index 00000000..7cc3472e
--- /dev/null
+++ b/test/sandbox/tool/package.nix
@@ -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
+ '';
+}