2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-secrets";
|
|
|
|
version = "1.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "awslabs";
|
|
|
|
repo = "git-secrets";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "10lnxg0q855zi3d6804ivlrn6dc817kilzdh05mmz8a0ccvm2qc7";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -m755 -Dt $out/bin git-secrets
|
|
|
|
install -m444 -Dt $out/share/man/man1 git-secrets.1
|
|
|
|
|
|
|
|
wrapProgram $out/bin/git-secrets \
|
2021-01-17 00:15:33 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ git coreutils ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Prevents you from committing secrets and credentials into git repositories";
|
|
|
|
homepage = "https://github.com/awslabs/git-secrets";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|