mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
Merge pull request #189817 from superherointj/package-gitleaks-8.12.0
gitleaks: 8.11.2 -> 8.12.0
This commit is contained in:
commit
680818a51b
@ -1,30 +1,47 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, gitleaks
|
||||||
|
, installShellFiles
|
||||||
|
, testers
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "gitleaks";
|
pname = "gitleaks";
|
||||||
version = "8.11.2";
|
version = "8.12.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "zricethezav";
|
owner = "zricethezav";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-E6ogPJQbg8hrfUNPIQ7b9c5at5VY73j0cEolzQpzUTM=";
|
sha256 = "sha256-g15ySGRX9f3zlmoatfzUomokdXyr33geNZnEQLle9rw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-KtBE8zOCSh/sItEpEA+I2cG3U44FJ2wxxVX3F6choUY=";
|
vendorSha256 = "sha256-Ev0/CSpwJDmc+Dvu/bFDzsgsq80rWImJWXNAUqYHgoE=";
|
||||||
|
|
||||||
ldflags = [
|
ldflags = [
|
||||||
"-s"
|
"-s"
|
||||||
"-w"
|
"-w"
|
||||||
"-X github.com/zricethezav/gitleaks/v${lib.versions.major version}/version.Version=${version}"
|
"-X github.com/zricethezav/gitleaks/v${lib.versions.major version}/cmd.Version=${version}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
# With v8 the config tests are are blocking
|
# With v8 the config tests are are blocking
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installShellCompletion --cmd ${pname} \
|
||||||
|
--bash <($out/bin/${pname} completion bash) \
|
||||||
|
--fish <($out/bin/${pname} completion fish) \
|
||||||
|
--zsh <($out/bin/${pname} completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.version = testers.testVersion {
|
||||||
|
package = gitleaks;
|
||||||
|
command = "${pname} version";
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Scan git repos (or files) for secrets";
|
description = "Scan git repos (or files) for secrets";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user