2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, pass }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "passff-host";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "passff";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-01-13 08:15:51 +00:00
|
|
|
sha256 = "sha256-P5h0B5ilwp3OVyDHIOQ23Zv4eLjN4jFkdZF293FQnNE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
makeFlags = [ "VERSION=${version}" ];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's#COMMAND = "pass"#COMMAND = "${pass}/bin/pass"#' src/passff.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
substituteInPlace bin/${version}/passff.json \
|
|
|
|
--replace PLACEHOLDER $out/share/passff-host/passff.py
|
|
|
|
|
|
|
|
install -Dt $out/share/passff-host \
|
|
|
|
bin/${version}/passff.{py,json}
|
|
|
|
|
|
|
|
nativeMessagingPaths=(
|
|
|
|
/lib/mozilla/native-messaging-hosts
|
|
|
|
/etc/opt/chrome/native-messaging-hosts
|
|
|
|
/etc/chromium/native-messaging-hosts
|
|
|
|
/etc/vivaldi/native-messaging-hosts
|
2021-12-26 17:43:05 +00:00
|
|
|
/lib/librewolf/native-messaging-hosts
|
2020-04-24 23:36:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
for manifestDir in "''${nativeMessagingPaths[@]}"; do
|
|
|
|
install -d $out$manifestDir
|
|
|
|
ln -s $out/share/passff-host/passff.json $out$manifestDir/
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Host app for the WebExtension PassFF";
|
|
|
|
homepage = "https://github.com/passff/passff-host";
|
2024-05-15 15:35:15 +00:00
|
|
|
license = licenses.gpl2Only;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|