From 89a05909a4fb393864a8aa752f6979dd9aaa2898 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 30 Mar 2025 21:09:16 +0900 Subject: test: move test program to sandbox directory This prepares for the separation of app and sandbox tests. Signed-off-by: Ophestra --- test/sandbox/tool/package.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/sandbox/tool/package.nix (limited to 'test/sandbox/tool/package.nix') 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 + ''; +} -- cgit v1.3.1