about summary refs log tree commit diff
path: root/pkgs/desktops/gnome/apps/polari/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/gnome/apps/polari/default.nix')
-rw-r--r--pkgs/desktops/gnome/apps/polari/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/apps/polari/default.nix b/pkgs/desktops/gnome/apps/polari/default.nix
new file mode 100644
index 0000000000000..0675ccb2f82d1
--- /dev/null
+++ b/pkgs/desktops/gnome/apps/polari/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, itstool, fetchurl, gdk-pixbuf, adwaita-icon-theme
+, telepathy-glib, gjs, meson, ninja, gettext, telepathy-idle, libxml2, desktop-file-utils
+, pkg-config, gtk3, glib, libsecret, libsoup, webkitgtk, gobject-introspection, appstream-glib
+, gnome, wrapGAppsHook, telepathy-logger, gspell, gsettings-desktop-schemas }:
+
+let
+  pname = "polari";
+  version = "3.38.0";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1l82nmb5qk4h69rsdhzlcmjjdhwh9jzfs4cnw8hy39sg5v9ady1s";
+  };
+
+  patches = [
+    # Upstream runs the thumbnailer by passing it to gjs.
+    # If we wrap it in a shell script, gjs can no longer run it.
+    # Let’s change the code to run the script directly by making it executable and having gjs in shebang.
+    ./make-thumbnailer-wrappable.patch
+  ];
+
+  propagatedUserEnvPkgs = [ telepathy-idle telepathy-logger ];
+
+  nativeBuildInputs = [
+    meson ninja pkg-config itstool gettext wrapGAppsHook libxml2
+    desktop-file-utils gobject-introspection appstream-glib
+  ];
+
+  buildInputs = [
+    gtk3 glib adwaita-icon-theme gsettings-desktop-schemas
+    telepathy-glib telepathy-logger gjs gspell gdk-pixbuf libsecret libsoup webkitgtk
+  ];
+
+  postFixup = ''
+    wrapGApp "$out/share/polari/thumbnailer.js"
+  '';
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      attrPath = "gnome.${pname}";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Apps/Polari";
+    description = "IRC chat client designed to integrate with the GNOME desktop";
+    maintainers = teams.gnome.members;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}