about summary refs log tree commit diff
path: root/pkgs/development/tools/database
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-05-15 22:02:20 -0400
committerfigsoda <figsoda@pm.me>2023-05-15 22:02:20 -0400
commitb03f1ceff6ca1eff154f79134b123bc4315f772c (patch)
treeb0896d15a856e677f10881317c1c5967dde279e1 /pkgs/development/tools/database
parentc985c39be7a57aa168c8dfd50ed912402773ce9d (diff)
mermerd: fix version command
Diffstat (limited to 'pkgs/development/tools/database')
-rw-r--r--pkgs/development/tools/database/mermerd/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/tools/database/mermerd/default.nix b/pkgs/development/tools/database/mermerd/default.nix
index 6df4922f043d3..9b71835e700cd 100644
--- a/pkgs/development/tools/database/mermerd/default.nix
+++ b/pkgs/development/tools/database/mermerd/default.nix
@@ -1,6 +1,6 @@
-{ buildGoModule
+{ lib
+, buildGoModule
 , fetchFromGitHub
-, lib
 }:
 
 buildGoModule rec {
@@ -16,15 +16,21 @@ buildGoModule rec {
 
   vendorHash = "sha256-RSCpkQymvUvY2bOkjhsyKnDa3vezUjC33Nwv0+O4OOQ=";
 
+  ldflags = [
+    "-s"
+    "-w"
+    "-X=main.version=${version}"
+    "-X=main.commit=${src.rev}"
+  ];
+
   # the tests expect a database to be running
   doCheck = false;
 
   meta = with lib; {
     description = "Create Mermaid-Js ERD diagrams from existing tables";
     homepage = "https://github.com/KarnerTh/mermerd";
-    license = licenses.mit;
-    maintainers = with lib.maintainers; [ austin-artificial ];
     changelog = "https://github.com/KarnerTh/mermerd/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ austin-artificial ];
   };
-
 }