diff --git a/pkgs/development/tools/database/mermerd/default.nix b/pkgs/development/tools/database/mermerd/default.nix index 6df4922f043d..2240c23433af 100644 --- a/pkgs/development/tools/database/mermerd/default.nix +++ b/pkgs/development/tools/database/mermerd/default.nix @@ -1,6 +1,8 @@ -{ buildGoModule +{ lib +, buildGoModule , fetchFromGitHub -, lib +, testers +, mermerd }: buildGoModule rec { @@ -16,15 +18,28 @@ 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; + passthru.tests = { + version = testers.testVersion { + package = mermerd; + command = "mermerd version"; + }; + }; + 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 ]; }; - }