···
13
+
src = fetchFromGitHub {
16
+
rev = "v${version}";
17
+
hash = "sha256-qv0nl3EEYVo/s79r+yK3ZQCGPXM2bzGdWatPY24aOZg=";
20
+
modRoot = "./githooks";
21
+
vendorHash = "sha256-ZcDD4Z/thtyCvXg6GzzKC/FSbh700QEaqXU8FaZaZc4=";
23
+
nativeBuildInputs = [ makeWrapper ];
25
+
buildInputs = [ git ];
30
+
"-s" # Disable symbole table.
31
+
"-w" # Disable DWARF generation.
34
+
# We need to disable updates and other features:
35
+
# That is done with tag `package_manager_enabled`.
36
+
tags = [ "package_manager_enabled" ];
41
+
"TestGithooksCompliesWithGit" # Needs internet to download all hooks documentation.
42
+
"TestUpdateImages" # Needs docker/podman.
48
+
"(${builtins.concatStringsSep "|" skippedTests})"
53
+
# We need to generate some build files before building.
55
+
GH_BUILD_VERSION="${version}" \
56
+
GH_BUILD_TAG="v${version}" \
57
+
go generate -mod=vendor ./...
61
+
# Rename executable to proper names.
62
+
mv $out/bin/cli $out/bin/githooks-cli
63
+
mv $out/bin/runner $out/bin/githooks-runner
64
+
mv $out/bin/dialog $out/bin/githooks-dialog
68
+
wrapProgram "$out/bin/githooks-cli" --prefix PATH : ${lib.makeBinPath [ git ]}
69
+
wrapProgram "$out/bin/githooks-runner" --prefix PATH : ${lib.makeBinPath [ git ]}
72
+
passthru.tests.version = testers.testVersion {
73
+
package = "githooks-cli";
74
+
command = "githooks-cli --version";
79
+
description = "A Git hooks manager with per-repo and shared Git hooks including version control";
80
+
homepage = "https://github.com/gabyx/Githooks";
81
+
license = licenses.mpl20;
82
+
maintainers = with maintainers; [ gabyx ];
83
+
mainProgram = "githooks-cli";