about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-05-28 13:14:06 +0200
committerGitHub <noreply@github.com>2019-05-28 13:14:06 +0200
commit53b08beea6eebf82a488cb1c12d59cfbfbc5c5f2 (patch)
tree4d6d14d91742a4939e581842e49c8a62343689b5 /pkgs
parent991d1aa4256799cceb2ad0ee7c70702ce68016b7 (diff)
tridactyl-native: init at 1.14.9 (#61703)
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/browsers/firefox/wrapper.nix2
-rw-r--r--pkgs/tools/networking/tridactyl-native/default.nix44
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix
index 61484478e4de9..6982f82a816d2 100644
--- a/pkgs/applications/networking/browsers/firefox/wrapper.nix
+++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix
@@ -8,6 +8,7 @@
 , google_talk_plugin, fribid, gnome3/*.gnome-shell*/
 , esteidfirefoxplugin
 , browserpass, chrome-gnome-shell, uget-integrator, plasma-browser-integration, bukubrow
+, tridactyl-native
 , udev
 , kerberos
 }:
@@ -67,6 +68,7 @@ let
         ([ ]
           ++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass)
           ++ lib.optional (cfg.enableBukubrow or false) bukubrow
+          ++ lib.optional (cfg.enableTridactylNative or false) tridactyl-native
           ++ lib.optional (cfg.enableGnomeExtensions or false) chrome-gnome-shell
           ++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator
           ++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma-browser-integration
diff --git a/pkgs/tools/networking/tridactyl-native/default.nix b/pkgs/tools/networking/tridactyl-native/default.nix
new file mode 100644
index 0000000000000..687dae2ea6fe8
--- /dev/null
+++ b/pkgs/tools/networking/tridactyl-native/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, fetchFromGitHub
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tridactyl-native";
+  # this is actually the version of tridactyl itself; the native messenger will
+  # probably not change with every tridactyl version
+  version = "1.14.9";
+
+  src = fetchFromGitHub {
+    owner = "tridactyl";
+    repo = "tridactyl";
+    rev = version;
+    sha256 = "0d80c744qfv6jd03cmdp3p71xaj8lq8jzsa2m24jxv9q4ks2dcmj";
+  };
+  sourceRoot = "source/native";
+
+  nativeBuildInputs = [
+    python3.pkgs.wrapPython
+  ];
+
+  buildPhase = ''
+    sed -i -e "s|REPLACE_ME_WITH_SED|$out/share/tridactyl/native_main.py|" "tridactyl.json"
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/lib/mozilla/native-messaging-hosts"
+    cp tridactyl.json "$out/lib/mozilla/native-messaging-hosts/"
+
+    mkdir -p "$out/share/tridactyl"
+    cp native_main.py "$out/share/tridactyl"
+    wrapPythonProgramsIn "$out/share/tridactyl"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Tridactyl native messaging host application";
+    homepage = https://github.com/tridactyl/tridactyl;
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ timokau ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8cd29f0cbd444..8000aea835b81 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2637,6 +2637,8 @@ in
 
   teamocil = callPackage ../tools/misc/teamocil { };
 
+  tridactyl-native = callPackage ../tools/networking/tridactyl-native { };
+
   uudeview = callPackage ../tools/misc/uudeview { };
 
   uutils-coreutils = callPackage ../tools/misc/uutils-coreutils {