2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
2023-04-12 12:48:02 +00:00
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, testers
|
|
|
|
, mermerd
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "mermerd";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "0.8.1";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KarnerTh";
|
|
|
|
repo = "mermerd";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-L/ieDhducOpdJ0vu578YcjSLTARlih81xAyly4pVE80=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
vendorHash = "sha256-RSCpkQymvUvY2bOkjhsyKnDa3vezUjC33Nwv0+O4OOQ=";
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.version=${version}"
|
|
|
|
"-X=main.commit=${src.rev}"
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# the tests expect a database to be running
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = mermerd;
|
|
|
|
command = "mermerd version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
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}";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ austin-artificial ];
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
}
|