2023-06-11 19:33:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, gtree
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gtree";
|
2023-11-18 22:28:10 +00:00
|
|
|
version = "1.10.3";
|
2023-06-11 19:33:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ddddddO";
|
|
|
|
repo = "gtree";
|
|
|
|
rev = "v${version}";
|
2023-11-18 22:28:10 +00:00
|
|
|
hash = "sha256-KFEYkhCLMcJ4NkHu0kkuG70EvJQ3HYDvicmomcMJZjc=";
|
2023-06-11 19:33:59 +00:00
|
|
|
};
|
|
|
|
|
2023-11-18 22:28:10 +00:00
|
|
|
vendorHash = "sha256-rvVrVv73gW26UUy1MyxKDjUgX1mrMMii+l8qU2hLOek=";
|
2023-06-11 19:33:59 +00:00
|
|
|
|
|
|
|
subPackages = [
|
|
|
|
"cmd/gtree"
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X=main.Version=${version}"
|
|
|
|
"-X=main.Revision=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion {
|
|
|
|
package = gtree;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Generate directory trees and directories using Markdown or programmatically";
|
|
|
|
homepage = "https://github.com/ddddddO/gtree";
|
|
|
|
changelog = "https://github.com/ddddddO/gtree/releases/tag/${src.rev}";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|