2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
|
2018-05-04 19:05:08 +01:00
|
|
|
|
2018-11-28 11:08:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "git-secrets";
|
2019-03-04 12:18:10 +00:00
|
|
|
version = "1.3.0";
|
2018-05-04 19:05:08 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "awslabs";
|
2018-11-28 11:08:47 +00:00
|
|
|
repo = "git-secrets";
|
2019-09-09 00:38:31 +01:00
|
|
|
rev = version;
|
2019-03-04 12:18:10 +00:00
|
|
|
sha256 = "10lnxg0q855zi3d6804ivlrn6dc817kilzdh05mmz8a0ccvm2qc7";
|
2018-05-04 19:05:08 +01:00
|
|
|
};
|
|
|
|
|
2018-11-28 11:08:47 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
2018-05-04 19:05:08 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2018-11-28 11:08:47 +00:00
|
|
|
install -m755 -Dt $out/bin git-secrets
|
|
|
|
install -m444 -Dt $out/share/man/man1 git-secrets.1
|
2018-05-04 19:05:08 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/git-secrets \
|
2021-01-15 13:21:58 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ git coreutils ]}"
|
2018-05-04 19:05:08 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-11-28 11:08:47 +00:00
|
|
|
description = "Prevents you from committing secrets and credentials into git repositories";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/awslabs/git-secrets";
|
2018-11-28 11:08:47 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
2018-05-04 19:05:08 +01:00
|
|
|
};
|
|
|
|
}
|