lol

Merge pull request #232135 from figsoda/mermerd

mermerd: fix version command

authored by

Weijia Wang and committed by
GitHub
752edce5 93cd2044

+20 -5
+20 -5
pkgs/development/tools/database/mermerd/default.nix
··· 1 - { buildGoModule 2 , fetchFromGitHub 3 - , lib 4 }: 5 6 buildGoModule rec { ··· 15 }; 16 17 vendorHash = "sha256-RSCpkQymvUvY2bOkjhsyKnDa3vezUjC33Nwv0+O4OOQ="; 18 19 # the tests expect a database to be running 20 doCheck = false; 21 22 meta = with lib; { 23 description = "Create Mermaid-Js ERD diagrams from existing tables"; 24 homepage = "https://github.com/KarnerTh/mermerd"; 25 - license = licenses.mit; 26 - maintainers = with lib.maintainers; [ austin-artificial ]; 27 changelog = "https://github.com/KarnerTh/mermerd/releases/tag/v${version}"; 28 }; 29 - 30 }
··· 1 + { lib 2 + , buildGoModule 3 , fetchFromGitHub 4 + , testers 5 + , mermerd 6 }: 7 8 buildGoModule rec { ··· 17 }; 18 19 vendorHash = "sha256-RSCpkQymvUvY2bOkjhsyKnDa3vezUjC33Nwv0+O4OOQ="; 20 + 21 + ldflags = [ 22 + "-s" 23 + "-w" 24 + "-X=main.version=${version}" 25 + "-X=main.commit=${src.rev}" 26 + ]; 27 28 # the tests expect a database to be running 29 doCheck = false; 30 31 + passthru.tests = { 32 + version = testers.testVersion { 33 + package = mermerd; 34 + command = "mermerd version"; 35 + }; 36 + }; 37 + 38 meta = with lib; { 39 description = "Create Mermaid-Js ERD diagrams from existing tables"; 40 homepage = "https://github.com/KarnerTh/mermerd"; 41 changelog = "https://github.com/KarnerTh/mermerd/releases/tag/v${version}"; 42 + license = licenses.mit; 43 + maintainers = with maintainers; [ austin-artificial ]; 44 }; 45 }