aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/hsu
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-06-25 20:44:49 +0900
committerOphestra <cat@gensokyo.uk>2025-06-25 20:50:24 +0900
commitaa454b158f3713b2ee47162837dcea1efdce0ee6 (patch)
tree71c9ebf64bf518311fccef1b9c0fc25d59778c26 /cmd/hsu
parent7007bd6a1c022dee1951413b820a54f5b4271bbb (diff)
cmd/planterette: remove hsu special case
Remove special case and invoke hakurei out of process. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/hsu')
-rw-r--r--cmd/hsu/main.go2
-rw-r--r--cmd/hsu/package.nix15
-rw-r--r--cmd/hsu/path.go1
3 files changed, 5 insertions, 13 deletions
diff --git a/cmd/hsu/main.go b/cmd/hsu/main.go
index cefcad48..28571b9b 100644
--- a/cmd/hsu/main.go
+++ b/cmd/hsu/main.go
@@ -41,7 +41,7 @@ func main() {
log.Fatalf("cannot read parent executable path: %v", err)
} else if strings.HasSuffix(p, " (deleted)") {
log.Fatal("hakurei executable has been deleted")
- } else if p != mustCheckPath(hmain) && p != mustCheckPath(fpkg) {
+ } else if p != mustCheckPath(hmain) {
log.Fatal("this program must be started by hakurei")
} else {
toolPath = p
diff --git a/cmd/hsu/package.nix b/cmd/hsu/package.nix
index 96ec5630..5fce566b 100644
--- a/cmd/hsu/package.nix
+++ b/cmd/hsu/package.nix
@@ -16,15 +16,8 @@ buildGoModule {
go mod init hsu >& /dev/null
'';
- ldflags =
- lib.attrsets.foldlAttrs
- (
- ldflags: name: value:
- ldflags ++ [ "-X main.${name}=${value}" ]
- )
- [ "-s -w" ]
- {
- hmain = "${hakurei}/libexec/hakurei";
- fpkg = "${hakurei}/libexec/fpkg";
- };
+ ldflags = lib.attrsets.foldlAttrs (
+ ldflags: name: value:
+ ldflags ++ [ "-X main.${name}=${value}" ]
+ ) [ "-s -w" ] { hmain = "${hakurei}/libexec/hakurei"; };
}
diff --git a/cmd/hsu/path.go b/cmd/hsu/path.go
index b4a7756a..53aa9d10 100644
--- a/cmd/hsu/path.go
+++ b/cmd/hsu/path.go
@@ -9,7 +9,6 @@ const compPoison = "INVALIDINVALIDINVALIDINVALIDINVALID"
var (
hmain = compPoison
- fpkg = compPoison
)
func mustCheckPath(p string) string {