about summary refs log tree commit diff
path: root/pkgs/applications/misc/wike
diff options
context:
space:
mode:
authorSam Alws <sam@samalws.com>2021-09-10 03:57:47 -0400
committerSam Alws <sam@samalws.com>2021-09-11 13:51:43 -0400
commit7fad7281d86fb063b57aaf11d78dabd506c80332 (patch)
tree483c8ad5058bb5eaf9f4d1802d86385a9bf2a134 /pkgs/applications/misc/wike
parented0e543cc6b2d752d8dadb716f12ebbc5a2f8738 (diff)
wike: init at 1.5.6
Diffstat (limited to 'pkgs/applications/misc/wike')
-rw-r--r--pkgs/applications/misc/wike/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/applications/misc/wike/default.nix b/pkgs/applications/misc/wike/default.nix
new file mode 100644
index 0000000000000..fac8ac2886d32
--- /dev/null
+++ b/pkgs/applications/misc/wike/default.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, fetchFromGitHub
+, meson, pkg-config, ninja
+, python3
+, glib, appstream-glib , desktop-file-utils
+, gobject-introspection, gtk3
+, wrapGAppsHook
+, libhandy, webkitgtk, glib-networking
+, gnome, dconf
+}:
+let
+  pythonEnv = python3.withPackages (p: with p; [
+    pygobject3
+    requests
+  ]);
+in stdenv.mkDerivation rec {
+  pname = "wike";
+  version = "1.5.6";
+
+  src = fetchFromGitHub {
+    owner = "hugolabe";
+    repo = "Wike";
+    rev = version;
+    sha256 = "1qnxzxqjj0sn522k15plskwa7nlhhbcipfc3w17fbq3k2zhpr1yy";
+  };
+
+  nativeBuildInputs = [
+    meson
+    pkg-config
+    ninja
+    appstream-glib
+    desktop-file-utils
+    gobject-introspection
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    pythonEnv
+    gtk3
+    libhandy
+    webkitgtk
+    glib-networking
+    gnome.adwaita-icon-theme
+    dconf
+  ];
+
+  postPatch = ''
+    patchShebangs build-aux/meson/postinstall.py
+    substituteInPlace src/wike.in    --replace "@PYTHON@" "${pythonEnv}/bin/python"
+    substituteInPlace src/wike-sp.in --replace "@PYTHON@" "${pythonEnv}/bin/python"
+  '';
+
+  meta = with lib; {
+    description = "Wikipedia Reader for the GNOME Desktop";
+    homepage = "https://github.com/hugolabe/Wike";
+    license = licenses.gpl3Plus;
+    platforms = webkitgtk.meta.platforms;
+    maintainers = with maintainers; [ samalws ];
+  };
+}