gnome3.polari: 3.34.1 -> 3.36.0

This commit is contained in:
Tor Hedin Brønner 2020-02-09 01:34:37 +01:00 committed by Jan Tojnar
parent e50099f019
commit 2734c88f33
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
2 changed files with 39 additions and 4 deletions

View file

@ -1,19 +1,26 @@
{ stdenv, itstool, fetchurl, gdk-pixbuf, adwaita-icon-theme
, telepathy-glib, gjs, meson, ninja, gettext, telepathy-idle, libxml2, desktop-file-utils
, pkgconfig, gtk3, glib, libsecret, libsoup, gobject-introspection, appstream-glib
, pkgconfig, gtk3, glib, libsecret, libsoup, webkitgtk, gobject-introspection, appstream-glib
, gnome3, wrapGAppsHook, telepathy-logger, gspell, gsettings-desktop-schemas }:
let
pname = "polari";
version = "3.34.1";
version = "3.36.0";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "0wcfkib673fpys7hcpi5cqc0zgqzqmqvpzjzx4wwmim8lb121x5w";
sha256 = "0wi7bpscm4rghlwljilsgrls5dy9p0b27k246a1vrdadjghc69l4";
};
patches = [
# Upstream runs the thumbnailer by passing it to gjs.
# If we wrap it in a shell script, gjs can no longer run it.
# Lets 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 = [
@ -23,9 +30,13 @@ in stdenv.mkDerivation rec {
buildInputs = [
gtk3 glib adwaita-icon-theme gsettings-desktop-schemas
telepathy-glib telepathy-logger gjs gspell gdk-pixbuf libsecret libsoup
telepathy-glib telepathy-logger gjs gspell gdk-pixbuf libsecret libsoup webkitgtk
];
postFixup = ''
wrapGApp "$out/share/polari/thumbnailer.js"
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;

View file

@ -0,0 +1,24 @@
diff --git a/src/thumbnailer.js b/src/thumbnailer.js
old mode 100644
new mode 100755
index e2ad0a5..7ebf08a
--- a/src/thumbnailer.js
+++ b/src/thumbnailer.js
@@ -1,3 +1,4 @@
+#!/usr/bin/env gjs
imports.gi.versions.Gdk = '3.0';
imports.gi.versions.Gtk = '3.0';
diff --git a/src/urlPreview.js b/src/urlPreview.js
index f17e0be..ccffc32 100644
--- a/src/urlPreview.js
+++ b/src/urlPreview.js
@@ -44,7 +44,7 @@ class Thumbnailer {
_generateThumbnail(data) {
let { filename, uri } = data;
this._subProc = Gio.Subprocess.new(
- ['gjs', `${pkg.pkgdatadir}/thumbnailer.js`, uri, filename],
+ [`${pkg.pkgdatadir}/thumbnailer.js`, uri, filename],
Gio.SubprocessFlags.NONE);
this._subProc.wait_async(null, (o, res) => {
try {