Files
hakurei/test/sandbox/tool/package.nix
2025-07-03 03:30:39 +09:00

31 lines
564 B
Nix

{
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 hakurei.app/test/sandbox >& /dev/null
'';
postInstall = ''
mv $out/bin/tool $out/bin/hakurei-test
'';
}