3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix

33 lines
858 B
Nix
Raw Normal View History

2018-11-28 11:08:47 +00:00
{ stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
2018-05-04 19:05:08 +01:00
2018-11-28 11:08:47 +00:00
stdenv.mkDerivation rec {
name = "git-secrets-${version}";
2018-05-04 19:05:08 +01:00
version = "1.2.1";
src = fetchFromGitHub {
owner = "awslabs";
2018-11-28 11:08:47 +00:00
repo = "git-secrets";
2018-05-04 23:02:55 +01:00
rev = "${version}";
2018-05-04 19:05:08 +01:00
sha256 = "14jsm4ks3k5d9iq3jr23829izw040pqpmv7dz8fhmvx6qz8fybzg";
};
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 \
2018-11-28 11:08:47 +00:00
--prefix PATH : "${stdenv.lib.makeBinPath [ git coreutils ]}"
2018-05-04 19:05:08 +01:00
'';
2018-11-28 11:08:47 +00:00
meta = with stdenv.lib; {
description = "Prevents you from committing secrets and credentials into git repositories";
2018-05-09 00:17:44 +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
};
}