From 6f0036ddc2ff6bb4268c9df0b6e0809bb37f7445 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Tue, 6 Feb 2024 23:17:47 +0800 Subject: [PATCH] snicat: set ldflags --- pkgs/by-name/sn/snicat/package.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/sn/snicat/package.nix b/pkgs/by-name/sn/snicat/package.nix index e7e9e6f3ab53..bbc3fded5b2f 100644 --- a/pkgs/by-name/sn/snicat/package.nix +++ b/pkgs/by-name/sn/snicat/package.nix @@ -1,5 +1,4 @@ { lib -, stdenv , buildGoPackage , fetchFromGitHub }: @@ -14,19 +13,12 @@ buildGoPackage rec { hash = "sha256-fFlTBOz127le2Y7F9KKhbcldcyFEpAU5QiJ4VCAPs9Y="; }; - patchPhase = '' - runHook prePatch - - substituteInPlace snicat.go \ - --replace-warn "v0.0.0" "v${version}" - - runHook postPatch - ''; - goPackagePath = "github.com/CTFd/snicat"; goDeps = ./deps.nix; + ldflags = [ "-s" "-w" "-X main.version=v${version}" ]; + installPhase = '' runHook preInstall