2022-06-25 14:59:41 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2024-03-17 04:20:00 +00:00
|
|
|
, fetchpatch
|
2022-06-25 14:59:41 +00:00
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-hibp";
|
2024-03-17 04:20:00 +00:00
|
|
|
version = "1.15.12";
|
2022-06-25 14:59:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
2023-02-13 19:51:51 +00:00
|
|
|
repo = "gopass-hibp";
|
2022-06-25 14:59:41 +00:00
|
|
|
rev = "v${version}";
|
2024-03-17 04:20:00 +00:00
|
|
|
hash = "sha256-5BnCaxF2XZ4f26KsTbapcZ2+Ii58nR/14pCj0c0QLKE=";
|
2022-06-25 14:59:41 +00:00
|
|
|
};
|
|
|
|
|
2024-03-17 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# go mod tidy. Remove with next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/gopasspw/gopass-hibp/commit/cdfdbc6da154874c74d7c8fc83bb11a98dd8fd81.patch";
|
|
|
|
hash = "sha256-jCzg3c8EizhoRYvWUZCys6/q2ChVWy/psPofNGIYdxs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
vendorHash = "sha256-GLqtwUg3fa1okdPoQBkF+ygpm8GLmDyIyUiC7/TTTaE=";
|
2022-06-25 14:59:41 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
2022-09-21 04:24:02 +00:00
|
|
|
wrapProgram $out/bin/gopass-hibp \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
|
2022-06-25 14:59:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Gopass haveibeenpwnd.com integration";
|
2023-08-09 22:11:00 +00:00
|
|
|
homepage = "https://github.com/gopasspw/gopass-hibp";
|
|
|
|
changelog = "https://github.com/gopasspw/gopass-hibp/blob/v${version}/CHANGELOG.md";
|
2022-06-25 14:59:41 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
2023-09-24 10:39:00 +00:00
|
|
|
mainProgram = "gopass-hibp";
|
2022-06-25 14:59:41 +00:00
|
|
|
};
|
|
|
|
}
|