about summary refs log tree commit diff
path: root/pkgs/applications/networking/feedreaders/feed2imap-go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2023-04-20 17:11:01 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2023-06-25 21:50:17 +0200
commit79be1d906ee38aa3de57787d11ca9e74b3b777f5 (patch)
tree0e50b7317272c39c60e8945e4485acc7e93947cb /pkgs/applications/networking/feedreaders/feed2imap-go
parent27343d6e6b710f386aa5df63bdeb16866a782b74 (diff)
feed2imap-go: Set correct LDFLAGS
As is common in Go, version information in the binary is set at compile
time via LDFLAGS.
Diffstat (limited to 'pkgs/applications/networking/feedreaders/feed2imap-go')
-rw-r--r--pkgs/applications/networking/feedreaders/feed2imap-go/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/networking/feedreaders/feed2imap-go/default.nix b/pkgs/applications/networking/feedreaders/feed2imap-go/default.nix
index a8245af52ec6f..b0bce2b71c5e4 100644
--- a/pkgs/applications/networking/feedreaders/feed2imap-go/default.nix
+++ b/pkgs/applications/networking/feedreaders/feed2imap-go/default.nix
@@ -11,6 +11,12 @@ buildGoModule rec {
     sha256 = "sha256-Qtpg8DvIFkba+Do8IwemBF0rt85wS4Tq7yOLsdpQFCs=";
   };
 
+  ldflags = [
+    "-s" "-w"
+    "-X github.com/Necoro/feed2imap-go/pkg/version.version=${version}"
+    "-X github.com/Necoro/feed2imap-go/pkg/version.commit=nixpkgs"
+  ];
+
   vendorHash = "sha256-WFbfSzU1N2RAOMfCM7wqiAQ6R1HRaT0EfX4KYhstHJU=";
 
   # The print-cache tool is not an end-user tool (https://github.com/Necoro/feed2imap-go/issues/94)