2022-04-27 12:45:14 +00:00
|
|
|
{ lib, nimPackages, fetchFromGitHub }:
|
2019-05-28 11:14:06 +00:00
|
|
|
|
2022-04-27 12:45:14 +00:00
|
|
|
nimPackages.buildNimPackage rec {
|
2022-11-13 12:57:11 +00:00
|
|
|
pname = "tridactyl-native";
|
2022-10-20 12:51:40 +00:00
|
|
|
version = "0.3.7";
|
2019-05-28 11:14:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tridactyl";
|
2022-04-27 12:45:14 +00:00
|
|
|
repo = "native_messenger";
|
2022-10-20 12:51:40 +00:00
|
|
|
rev = "62f19dba573b924703829847feb1bfee68885514";
|
|
|
|
sha256 = "sha256-YGDVcfFcI9cRCCZ4BrO5xTuI9mrGq1lfbEITB7o3vQQ=";
|
2019-05-28 11:14:06 +00:00
|
|
|
};
|
2022-04-27 12:45:14 +00:00
|
|
|
buildInputs = with nimPackages; [ tempfile ];
|
2019-05-28 11:14:06 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/lib/mozilla/native-messaging-hosts"
|
2022-04-27 12:45:14 +00:00
|
|
|
sed -i -e "s|REPLACE_ME_WITH_SED|$out/bin/native_main|" "tridactyl.json"
|
2019-05-28 11:14:06 +00:00
|
|
|
cp tridactyl.json "$out/lib/mozilla/native-messaging-hosts/"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-04-27 12:45:14 +00:00
|
|
|
description =
|
|
|
|
"Native messenger for Tridactyl, a vim-like Firefox webextension";
|
|
|
|
homepage = "https://github.com/tridactyl/native_messenger";
|
|
|
|
license = licenses.bsd2;
|
2019-05-28 11:14:06 +00:00
|
|
|
platforms = platforms.all;
|
2022-04-27 12:45:14 +00:00
|
|
|
maintainers = with maintainers; [ timokau dit7ya ];
|
2019-05-28 11:14:06 +00:00
|
|
|
};
|
|
|
|
}
|