depot/third_party/nixpkgs/pkgs/tools/security/gopass/git-credential.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

40 lines
895 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, gopass
}:
buildGoModule rec {
pname = "git-credential-gopass";
version = "1.15.0";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
hash = "sha256-o1kkS8JlPFIiwm3nQLMuERcb4NC3v8FIG0kYGrGzkbA=";
};
vendorHash = "sha256-KPCmYNSMa8F9xtStEyN5xho2/OF1ZqVFmLexHV3wJzM=";
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
];
postFixup = ''
wrapProgram $out/bin/git-credential-gopass \
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
'';
meta = with lib; {
description = "Manage git credentials using gopass";
homepage = "https://github.com/gopasspw/git-credential-gopass";
license = licenses.mit;
maintainers = with maintainers; [ benneti ];
};
}