2022-06-25 16:59:41 +02:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-hibp";
|
2023-08-10 00:11:00 +02:00
|
|
|
version = "1.15.7";
|
2022-06-25 16:59:41 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
2023-02-13 20:51:51 +01:00
|
|
|
repo = "gopass-hibp";
|
2022-06-25 16:59:41 +02:00
|
|
|
rev = "v${version}";
|
2023-08-10 00:11:00 +02:00
|
|
|
hash = "sha256-525e2LXQ/Ldrqhxqndwpdo2HeS4xRkbPzfwvWeiEayE=";
|
2022-06-25 16:59:41 +02:00
|
|
|
};
|
|
|
|
|
2023-08-10 00:11:00 +02:00
|
|
|
vendorHash = "sha256-jfqxl21euOtOvt+RltVlSjca2o8VuLtWHgpnW4ve5JM=";
|
2022-06-25 16:59:41 +02:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
2022-09-21 06:24:02 +02:00
|
|
|
wrapProgram $out/bin/gopass-hibp \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
|
2022-06-25 16:59:41 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Gopass haveibeenpwnd.com integration";
|
2023-08-10 00:11:00 +02:00
|
|
|
homepage = "https://github.com/gopasspw/gopass-hibp";
|
|
|
|
changelog = "https://github.com/gopasspw/gopass-hibp/blob/v${version}/CHANGELOG.md";
|
2022-06-25 16:59:41 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
};
|
|
|
|
}
|