aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/interactive/raceattr.nix
diff options
context:
space:
mode:
Diffstat (limited to 'test/interactive/raceattr.nix')
-rw-r--r--test/interactive/raceattr.nix44
1 files changed, 25 insertions, 19 deletions
diff --git a/test/interactive/raceattr.nix b/test/interactive/raceattr.nix
index 8140beb1..d94d7a7b 100644
--- a/test/interactive/raceattr.nix
+++ b/test/interactive/raceattr.nix
@@ -1,24 +1,30 @@
{ lib, pkgs, ... }:
-let
- inherit (pkgs) buildGoModule;
-in
{
- environment.systemPackages = [
- (buildGoModule rec {
- name = "raceattr";
- pname = name;
- tags = [ "raceattr" ];
+ security.wrappers.raceattr =
+ let
+ inherit (pkgs) buildGoModule;
+ in
+ {
+ setuid = true;
+ owner = "root";
+ group = "root";
+ source = "${
+ (buildGoModule rec {
+ name = "raceattr";
+ pname = name;
+ tags = [ "raceattr" ];
- src = builtins.path {
- name = "${pname}-src";
- path = lib.cleanSource ../../cmd/sharefs/test;
- filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
- };
- vendorHash = null;
+ src = builtins.path {
+ name = "${pname}-src";
+ path = lib.cleanSource ../../cmd/sharefs/test;
+ filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
+ };
+ vendorHash = null;
- preBuild = ''
- go mod init hakurei.app/raceattr >& /dev/null
- '';
- })
- ];
+ preBuild = ''
+ go mod init hakurei.app/raceattr >& /dev/null
+ '';
+ })
+ }/bin/raceattr";
+ };
}