1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 curl,
6 findutils,
7 gnugrep,
8 gnused,
9 shellcheck,
10}:
11
12let
13 pname = "pass-checkup";
14 version = "0.2.2";
15in
16stdenv.mkDerivation {
17 inherit pname version;
18
19 src = fetchFromGitHub {
20 owner = "etu";
21 repo = pname;
22 rev = version;
23 sha256 = "1p65yxr00k35g4bnagszp8i03pmhnrcmipgrdsawps2ba8faqp6r";
24 };
25
26 nativeBuildInputs = [ shellcheck ];
27
28 postPatch = ''
29 substituteInPlace checkup.bash \
30 --replace curl ${curl}/bin/curl \
31 --replace find ${findutils}/bin/find \
32 --replace grep ${gnugrep}/bin/grep \
33 --replace sed ${gnused}/bin/sed
34 '';
35
36 installPhase = ''
37 runHook preInstall
38
39 install -D -m755 checkup.bash $out/lib/password-store/extensions/checkup.bash
40
41 runHook postInstall
42 '';
43
44 meta = with lib; {
45 description = "Pass extension to check against the Have I been pwned API to see if your passwords are publicly leaked or not";
46 homepage = "https://github.com/etu/pass-checkup";
47 license = licenses.gpl3Plus;
48 maintainers = with maintainers; [ etu ];
49 platforms = platforms.unix;
50 };
51}