aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-26 12:03:25 +0900
committerOphestra <cat@gensokyo.uk>2025-02-26 12:03:25 +0900
commit6d4ac3d9fdf1cc44249bf90c89e6da56028fde4f (patch)
treef261c7ecc9bcb3bbef5d5eb7922ff86b761c3a3a
parenta5d2f040fb01588cc980c4577a4ba8fac01526f0 (diff)
internal: store fortify path in internal
This now makes more sense due to the changes in build system. Signed-off-by: Ophestra <cat@gensokyo.uk>
-rwxr-xr-xdist/release.sh1
-rw-r--r--internal/path.go3
-rw-r--r--package.nix1
3 files changed, 4 insertions, 1 deletions
diff --git a/dist/release.sh b/dist/release.sh
index 05be8404..88171860 100755
--- a/dist/release.sh
+++ b/dist/release.sh
@@ -12,6 +12,7 @@ go generate ./...
go build -trimpath -v -o "${out}/bin/" -ldflags "-s -w -buildid= -extldflags '-static'
-X git.gensokyo.uk/security/fortify/internal.Version=${VERSION}
-X git.gensokyo.uk/security/fortify/internal.Fsu=/usr/bin/fsu
+ -X git.gensokyo.uk/security/fortify/internal.Fortify=/usr/bin/fortify
-X main.Fmain=/usr/bin/fortify" ./...
rm -f "./${out}.tar.gz" && tar -C dist -czf "${out}.tar.gz" "${pname}"
diff --git a/internal/path.go b/internal/path.go
index 9f3e1cfc..97b0754c 100644
--- a/internal/path.go
+++ b/internal/path.go
@@ -3,7 +3,8 @@ package internal
import "path"
var (
- Fsu = compPoison
+ Fsu = compPoison
+ Fortify = compPoison
)
func Path(p string) (string, bool) {
diff --git a/package.nix b/package.nix
index c081663b..e45b857d 100644
--- a/package.nix
+++ b/package.nix
@@ -50,6 +50,7 @@ buildGoModule rec {
{
Version = "v${version}";
Fsu = "/run/wrappers/bin/fsu";
+ Fortify = "${placeholder "out"}/libexec/fortify";
};
# nix build environment does not allow acls