gnome.polari: 3.38.0 → 41.0

UI uses GTK 4, thumbnailer GTK 3 (due to a dependency on WebkitGtk, where GTK 4 support is still experimental).

Both work, though the console is full of warnings.
This commit is contained in:
Jan Tojnar 2021-09-23 23:44:41 +02:00
parent 6fe6ba7737
commit 9778394a78
2 changed files with 19 additions and 21 deletions

View file

@ -1,17 +1,15 @@
{ 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 }:
, pkg-config, gtk4, gtk3, glib, libsecret, libsoup, webkitgtk, gobject-introspection, appstream-glib
, gnome, wrapGAppsHook4, telepathy-logger, gspell, gsettings-desktop-schemas }:
let
stdenv.mkDerivation rec {
pname = "polari";
version = "3.38.0";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "41.0";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1l82nmb5qk4h69rsdhzlcmjjdhwh9jzfs4cnw8hy39sg5v9ady1s";
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "o7BfgWYDcMZ8lCtvRLKYx7eIFv6zjJJuwiEr3iLqQOs=";
};
patches = [
@ -24,12 +22,12 @@ in stdenv.mkDerivation rec {
propagatedUserEnvPkgs = [ telepathy-idle telepathy-logger ];
nativeBuildInputs = [
meson ninja pkg-config itstool gettext wrapGAppsHook libxml2
meson ninja pkg-config itstool gettext wrapGAppsHook4 libxml2
desktop-file-utils gobject-introspection appstream-glib
];
buildInputs = [
gtk3 glib adwaita-icon-theme gsettings-desktop-schemas
gtk4 gtk3 glib adwaita-icon-theme gsettings-desktop-schemas
telepathy-glib telepathy-logger gjs gspell gdk-pixbuf libsecret libsoup webkitgtk
];

View file

@ -1,24 +1,24 @@
diff --git a/src/thumbnailer.js b/src/thumbnailer.js
old mode 100644
new mode 100755
index e2ad0a5..7ebf08a
index ed6350ea..83d832cb
--- 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';
+#!/usr/bin/env gjs --module
import Cairo from 'cairo';
import Gdk from 'gi://Gdk?version=3.0';
import Gio from 'gi://Gio';
diff --git a/src/urlPreview.js b/src/urlPreview.js
index f17e0be..ccffc32 100644
index 5f7931e4..d2282900 100644
--- a/src/urlPreview.js
+++ b/src/urlPreview.js
@@ -44,7 +44,7 @@ class Thumbnailer {
_generateThumbnail(data) {
@@ -69,7 +69,7 @@ class Thumbnailer {
async _generateThumbnail(data) {
let { filename, uri } = data;
this._subProc = Gio.Subprocess.new(
- ['gjs', `${pkg.pkgdatadir}/thumbnailer.js`, uri, filename],
- ['gjs', '--module', `${pkg.pkgdatadir}/thumbnailer.js`, uri, filename],
+ [`${pkg.pkgdatadir}/thumbnailer.js`, uri, filename],
Gio.SubprocessFlags.NONE);
this._subProc.wait_async(null, (o, res) => {
try {
try {
await this._subProc.wait_async(null);