1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5 nix-update-script,
6 testers,
7 treegen,
8}:
9
10buildGoModule rec {
11 pname = "treegen";
12 version = "1.1.0";
13
14 src = fetchFromGitHub {
15 owner = "bilbilak";
16 repo = "treegen";
17 tag = "v${version}";
18 hash = "sha256-PPWUEfX7OXKZnghiVXU+eCjveA1VszA3uS8C3uI3pFM=";
19 };
20
21 vendorHash = "sha256-hocnLCzWN8srQcO3BMNkd2lt0m54Qe7sqAhUxVZlz1k=";
22
23 ldflags = [
24 "-s"
25 "-w"
26 "-X github.com/bilbilak/treegen/config.Version=${version}"
27 ];
28
29 passthru = {
30 tests = {
31 version = testers.testVersion {
32 package = treegen;
33 command = "treegen --version";
34 };
35 };
36
37 updateScript = nix-update-script { };
38 };
39
40 meta = {
41 changelog = "https://github.com/bilbilak/treegen/blob/main/CHANGELOG.md";
42 description = "ASCII Tree Directory and File Structure Generator";
43 homepage = "https://github.com/bilbilak/treegen";
44 license = lib.licenses.gpl3Only;
45 mainProgram = "treegen";
46 maintainers = with lib.maintainers; [ _4r7if3x ];
47 platforms = with lib.platforms; unix ++ windows;
48 };
49}