nixpkgs/pkgs/tools/security/pass/extensions/checkup.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
, curl, findutils, gnugrep, gnused, shellcheck }:
2019-10-24 17:51:58 +02:00
let
2019-10-24 17:51:58 +02:00
pname = "pass-checkup";
version = "0.2.1";
in stdenv.mkDerivation {
inherit pname version;
2019-10-24 17:51:58 +02:00
src = fetchFromGitHub {
owner = "etu";
repo = pname;
2019-10-24 17:51:58 +02:00
rev = version;
sha256 = "18b6rx59r7g0hvqs2affvw0g0jyifyzhanwgz2q2b8nhjgqgnar2";
2019-10-24 17:51:58 +02:00
};
nativeBuildInputs = [ shellcheck ];
postPatch = ''
2019-10-24 17:51:58 +02:00
substituteInPlace checkup.bash \
--replace curl ${curl}/bin/curl \
--replace find ${findutils}/bin/find \
--replace grep ${gnugrep}/bin/grep \
--replace sed ${gnused}/bin/sed
'';
installPhase = ''
runHook preInstall
2019-10-24 17:51:58 +02:00
install -D -m755 checkup.bash $out/lib/password-store/extensions/checkup.bash
runHook postInstall
2019-10-24 17:51:58 +02:00
'';
meta = with lib; {
2019-10-25 16:41:44 +02:00
description = "A pass extension to check against the Have I been pwned API to see if your passwords are publicly leaked or not";
2019-10-24 17:51:58 +02:00
homepage = "https://github.com/etu/pass-checkup";
license = licenses.gpl3Plus;
2019-10-24 17:51:58 +02:00
maintainers = with maintainers; [ etu ];
platforms = platforms.unix;
};
}