Merge pull request #232135 from figsoda/mermerd

mermerd: fix version command
This commit is contained in:
Weijia Wang 2023-05-16 07:51:03 +02:00 committed by GitHub
commit 752edce5e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ];
};
}