mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 15:04:44 +00:00
36 lines
880 B
Nix
36 lines
880 B
Nix
{ stdenv, lib, fetchFromGitHub, makeWrapper, git }:
|
|
|
|
let
|
|
version = "1.2.1";
|
|
repo = "git-secrets";
|
|
|
|
in stdenv.mkDerivation {
|
|
name = "${repo}-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
inherit repo;
|
|
owner = "awslabs";
|
|
rev = "v${version}";
|
|
sha256 = "14jsm4ks3k5d9iq3jr23829izw040pqpmv7dz8fhmvx6qz8fybzg";
|
|
};
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
install -D git-secrets $out/bin/git-secrets
|
|
|
|
wrapProgram $out/bin/git-secrets \
|
|
--prefix PATH : "${lib.makeBinPath [ git ]}"
|
|
|
|
mkdir $out/share
|
|
cp -r man $out/share
|
|
'';
|
|
|
|
meta = {
|
|
description = "Prevents you from committing passwords and other sensitive information to a git repository";
|
|
homepage = https://github.com/awslabs/git-secretshttps://github.com/awslabs/git-secrets;
|
|
license = stdenv.lib.licenses.asl20;
|
|
platforms = stdenv.lib.platforms.all;
|
|
};
|
|
}
|