2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-hibp";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.15.2";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-2F1OqVxXrQpwg2M1o8gQzczXI2JKVFCA1K6kGUc+e5U=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
vendorHash = "sha256-3KYEn4+YI5KwAlfokUF5hU801xylWVtmJwocVl6QfhM=";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
wrapProgram $out/bin/gopass-hibp \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Gopass haveibeenpwnd.com integration";
|
|
|
|
homepage = "https://www.gopass.pw/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
};
|
|
|
|
}
|