about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/eolie
diff options
context:
space:
mode:
authorSam Parkinson <sam@sam.today>2017-12-26 14:55:28 +1100
committerYegor Timoshenko <yegortimoshenko@gmail.com>2017-12-29 07:24:52 +0000
commitca74d62bdd21ae0a18cbee18f5d102579e1b3ab5 (patch)
treed766d74244715e38ea721d83564fcb28441119df /pkgs/applications/networking/browsers/eolie
parentade98dc442ea78e9783d5e26954e64ec4a1b2c94 (diff)
eolie: init at 0.9.16
Diffstat (limited to 'pkgs/applications/networking/browsers/eolie')
-rw-r--r--pkgs/applications/networking/browsers/eolie/0001-Extend-the-python-path-rather-than-replacing-it.patch35
-rw-r--r--pkgs/applications/networking/browsers/eolie/0001-Remove-post-install-script-handle-in-nix-config-inst.patch23
-rw-r--r--pkgs/applications/networking/browsers/eolie/default.nix68
3 files changed, 126 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/eolie/0001-Extend-the-python-path-rather-than-replacing-it.patch b/pkgs/applications/networking/browsers/eolie/0001-Extend-the-python-path-rather-than-replacing-it.patch
new file mode 100644
index 0000000000000..347fb8e128770
--- /dev/null
+++ b/pkgs/applications/networking/browsers/eolie/0001-Extend-the-python-path-rather-than-replacing-it.patch
@@ -0,0 +1,35 @@
+From b51b63b78c9ff1639f5f65ccfdd54681f1cadc1d Mon Sep 17 00:00:00 2001
+From: Sam Parkinson <sam@sam.today>
+Date: Tue, 26 Dec 2017 14:46:27 +1100
+Subject: [PATCH] Extend the python path; rather than replacing it
+
+Some distros (i.e. NixOS) require the special PYTHONPATH, so that
+the web extension has access to the python packages it wants (i.e. gi).
+
+Previously, the PYTHONPATH was replaced with the web extension path;
+meaning it would crash on NixOS.  This instead prepends the web
+extension path to the PYTHONPATH.
+---
+ eolie/application.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/eolie/application.py b/eolie/application.py
+index 3c21542..bed4e55 100644
+--- a/eolie/application.py
++++ b/eolie/application.py
+@@ -340,7 +340,11 @@ class Application(Gtk.Application):
+         self.settings = Settings.new()
+ 
+         # Init extensions
+-        GLib.setenv("PYTHONPATH", self.__extension_dir, True)
++        current_path = GLib.getenv("PYTHONPATH")
++        new_path = self.__extension_dir
++        if current_path:
++            new_path = new_path + ':' + current_path
++        GLib.setenv("PYTHONPATH", new_path, True)
+ 
+         # Create favicon path
+         if not GLib.file_test(self.__FAVICONS_PATH, GLib.FileTest.IS_DIR):
+-- 
+2.15.0
+
diff --git a/pkgs/applications/networking/browsers/eolie/0001-Remove-post-install-script-handle-in-nix-config-inst.patch b/pkgs/applications/networking/browsers/eolie/0001-Remove-post-install-script-handle-in-nix-config-inst.patch
new file mode 100644
index 0000000000000..770cd8afa9ef4
--- /dev/null
+++ b/pkgs/applications/networking/browsers/eolie/0001-Remove-post-install-script-handle-in-nix-config-inst.patch
@@ -0,0 +1,23 @@
+From a79d2dcd1b6275904193454fb9d68614813929f3 Mon Sep 17 00:00:00 2001
+From: Sam Parkinson <sam@sam.today>
+Date: Mon, 27 Nov 2017 11:17:35 +1100
+Subject: [PATCH] Remove post install script - handle in nix config instead
+
+---
+ meson.build | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index fc45296..2227f1f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -53,5 +53,3 @@ configure_file(
+   configuration: conf,
+   install_dir: bindir
+ )
+-
+-meson.add_install_script('meson_post_install.py')
+-- 
+2.15.0
+
+
diff --git a/pkgs/applications/networking/browsers/eolie/default.nix b/pkgs/applications/networking/browsers/eolie/default.nix
new file mode 100644
index 0000000000000..e41783ddf5ba1
--- /dev/null
+++ b/pkgs/applications/networking/browsers/eolie/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchgit, intltool, itstool, meson, ninja, pkgconfig, wrapGAppsHook
+, git, glib, glib_networking, gsettings_desktop_schemas, gst_all_1, gtk3
+, gtkspell3, libsecret, python36, python36Packages, webkitgtk }:
+
+stdenv.mkDerivation rec {
+  name = "eolie-${version}";
+  version = "0.9.16";
+
+  src = fetchgit {
+    url = "https://gitlab.gnome.org/gnumdk/eolie";
+    rev = version;
+    sha256 = "0mvhr6hy4nx7xaq9r9qp5rb0y293kjjryw5ykzb473cr3iwzk25b";
+  };
+
+  nativeBuildInputs = [
+    intltool
+    itstool
+    meson
+    ninja
+    pkgconfig
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    git # required to download ad blocking DB
+    glib_networking
+    gsettings_desktop_schemas
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-bad
+    gst_all_1.gst-plugins-ugly
+    gst_all_1.gst-libav
+    gtk3
+    gtkspell3
+    libsecret
+    python36
+    python36Packages.pygobject3
+    python36Packages.pycairo
+    python36Packages.dateutil
+    python36Packages.dbus-python
+    python36Packages.beautifulsoup4
+    python36Packages.pycrypto
+    python36Packages.requests
+    webkitgtk
+  ];
+
+  wrapPrefixVariables = [ "PYTHONPATH" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
+  '';
+
+  patches = [
+    ./0001-Remove-post-install-script-handle-in-nix-config-inst.patch
+    ./0001-Extend-the-python-path-rather-than-replacing-it.patch
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A new GNOME web browser";
+    homepage = https://gitlab.gnome.org/gnumdk/eolie;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.samdroid-apps ];
+    platforms = platforms.linux;
+  };
+}