depot/third_party/nixpkgs/pkgs/applications/version-management/git-secrets/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

33 lines
869 B
Nix

{ lib, 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 : "${lib.makeBinPath [ git coreutils ]}"
'';
meta = with 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;
mainProgram = "git-secrets";
};
}