9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
45 lines
998 B
Nix
45 lines
998 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, testers
|
|
, mermerd
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "mermerd";
|
|
version = "0.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "KarnerTh";
|
|
repo = "mermerd";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-fqM+sOWk3gqbZ5xKR6CS1SY5bSRrAhHcM1d6ugqFbw4=";
|
|
};
|
|
|
|
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";
|
|
changelog = "https://github.com/KarnerTh/mermerd/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ austin-artificial ];
|
|
};
|
|
}
|