Unverified Commit 752edce5 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #232135 from figsoda/mermerd

mermerd: fix version command
parents 93cd2044 d4e3be78
Loading
Loading
Loading
Loading
+20 −5
Original line number Diff line number Diff line
{ 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 ];
  };

}