nixpkgs/pkgs/tools/security/gopass/hibp.nix
2022-06-25 18:00:22 +03:00

40 lines
844 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, gopass
}:
buildGoModule rec {
pname = "gopass-hibp";
version = "1.14.3";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
sha256 = "sha256-JwZZ2VaSD9xkLny5sFeku5rN4FitI1dyW56JSWPMagM=";
};
vendorSha256 = "sha256-YySkVWdfGIT5qz0jTGlLEHoO0vGY0iNZ/oG9IZCjwRE=";
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
];
postFixup = ''
wrapProgram $out/bin/gopass-hibp --prefix PATH : "${lib.makeBinPath [ gopass ]}"
'';
meta = with lib; {
description = "Gopass haveibeenpwnd.com integration";
homepage = "https://www.gopass.pw/";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
};
}