diff options
Diffstat (limited to 'cmd/hsu')
| -rw-r--r-- | cmd/hsu/main.go | 2 | ||||
| -rw-r--r-- | cmd/hsu/package.nix | 15 | ||||
| -rw-r--r-- | cmd/hsu/path.go | 1 |
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 { |
