depot/third_party/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

32 lines
845 B
Nix

{ stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
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 \
--prefix PATH : "${stdenv.lib.makeBinPath [ git coreutils ]}"
'';
meta = with stdenv.lib; {
description = "Prevents you from committing secrets and credentials into git repositories";
homepage = "https://github.com/awslabs/git-secrets";
license = licenses.asl20;
platforms = platforms.all;
};
}