diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-07-07 18:32:56 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-07-07 18:56:27 +0900 |
| commit | 6d55ee536e902d059380f79e870d06547627cc7c (patch) | |
| tree | aacf3e3ec42525cf0e7a674aa948359fd0c21ae2 /test/hsu.nix | |
| parent | c8e8651694415d497b0800319b2ddda361b7651f (diff) | |
test: move nix files
These are too much clutter. Move them to test directory until the test suite replacement is upstreamed.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/hsu.nix')
| -rw-r--r-- | test/hsu.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/hsu.nix b/test/hsu.nix new file mode 100644 index 00000000..7acb3529 --- /dev/null +++ b/test/hsu.nix @@ -0,0 +1,23 @@ +{ + lib, + buildGoModule, + hakurei ? abort "hakurei package required", +}: + +buildGoModule { + pname = "${hakurei.pname}-hsu"; + inherit (hakurei) version; + + src = ../cmd/hsu; + inherit (hakurei) vendorHash; + env.CGO_ENABLED = 0; + + preBuild = '' + go mod init hsu >& /dev/null + ''; + + ldflags = lib.attrsets.foldlAttrs ( + ldflags: name: value: + ldflags ++ [ "-X main.${name}=${value}" ] + ) [ "-s -w" ] { hakureiPath = "${hakurei}/libexec/hakurei"; }; +} |
