gnomeExtensions: Update for GNOME 45

This commit is contained in:
piegames
2023-11-21 08:42:35 +01:00
committed by Jan Tojnar
parent 573f967c39
commit fc495aea1f
9 changed files with 824 additions and 502 deletions
@@ -343,5 +343,11 @@
"batime@martin.zurowietz.de",
"batterytime@typeof.pw"
]
},
"45": {
"applications-menu": [
"apps-menu@gnome-shell-extensions.gcampax.github.com",
"Applications_Menu@rmy.pobox.com"
]
}
}
+2 -1
View File
@@ -62,9 +62,10 @@ in rec {
gnome42Extensions = mapUuidNames (produceExtensionsList "42");
gnome43Extensions = mapUuidNames (produceExtensionsList "43");
gnome44Extensions = mapUuidNames (produceExtensionsList "44");
gnome45Extensions = mapUuidNames (produceExtensionsList "45");
# Keep the last three versions in here
gnomeExtensions = lib.trivial.pipe (gnome42Extensions // gnome43Extensions // gnome44Extensions) [
gnomeExtensions = lib.trivial.pipe (gnome43Extensions // gnome44Extensions // gnome45Extensions) [
# Apply some custom patches for automatically packaged extensions
(callPackage ./extensionOverrides.nix {})
# Add all manually packaged extensions
@@ -47,17 +47,11 @@ super: lib.trivial.pipe super [
}))
(patchExtension "ddterm@amezin.github.com" (old: {
# Requires gjs, zenity & vte via the typelib
nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];
buildInputs = [ vte ];
postPatch = ''
for file in *.js com.github.amezin.ddterm; do
substituteInPlace $file --replace "gjs" "${gjs}/bin/gjs"
substituteInPlace $file --replace "zenity" "${gnome.zenity}/bin/zenity"
done
'';
postFixup = ''
wrapGApp "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/com.github.amezin.ddterm"
wrapGApp "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/bin/com.github.amezin.ddterm"
wrapGApp "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/ddterm/app/dependencies-notification.js"
'';
}))
@@ -101,6 +95,7 @@ super: lib.trivial.pipe super [
}))
(patchExtension "gtk4-ding@smedius.gitlab.com" (old: {
nativeBuildInputs = [ wrapGAppsHook ];
patches = [
(substituteAll {
inherit gjs util-linux xdg-utils;
@@ -110,6 +105,10 @@ super: lib.trivial.pipe super [
nautilus_gsettings_path = "${glib.getSchemaPath gnome.nautilus}";
})
];
postFixup = ''
wrapGApp "$out/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/ding.js"
wrapGApp "$out/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/createThumbnail.js"
'';
}))
(patchExtension "pano@elhan.io" (old: {
@@ -1,23 +1,3 @@
diff --git a/app/createThumbnail.js b/app/createThumbnail.js
index ebe5213..9f67873 100755
--- a/app/createThumbnail.js
+++ b/app/createThumbnail.js
@@ -1,4 +1,4 @@
-#!/usr/bin/gjs
+#!@gjs@/bin/gjs
/* DING: Desktop Icons New Generation for GNOME Shell
*
diff --git a/app/ding.js b/app/ding.js
index b200be4..3ce05ef 100755
--- a/app/ding.js
+++ b/app/ding.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env gjs
+#!@gjs@/bin/gjs
/* DING: Desktop Icons New Generation for GNOME Shell
*
diff --git a/app/fileItemMenu.js b/app/fileItemMenu.js
index cadca48..9632ecc 100644
--- a/app/fileItemMenu.js
@@ -61,49 +41,25 @@ index c89271c..29f0db8 100644
if (!compressionSchema)
this.nautilusCompression = null;
else
diff --git a/app/thumbnailapp.js b/app/thumbnailapp.js
index b22bbe0..c5c7711 100755
--- a/app/thumbnailapp.js
+++ b/app/thumbnailapp.js
@@ -1,4 +1,4 @@
-#!/usr/bin/env gjs
+#!@gjs@/bin/gjs
diff --git a/dingManager.js b/dingManager.js
index b738b32..df186e5 100644
--- a/dingManager.js
+++ b/dingManager.js
@@ -397,7 +397,7 @@ const DingManager = class {
async _doKillAllOldDesktopProcesses() {
const procFolder = Gio.File.new_for_path('/proc');
const processes = await FileUtils.enumerateDir(procFolder);
- const thisPath = `gjs ${GLib.build_filenamev([
+ const thisPath = `@gjs@/bin/gjs ${GLib.build_filenamev([
this.path,
'app',
'ding.js',
@@ -421,7 +421,7 @@ const DingManager = class {
}
/* DING: Desktop Icons New Generation for GNOME Shell
*
diff --git a/extension.js b/extension.js
index 2e5bcaa..4eaa108 100644
--- a/extension.js
+++ b/extension.js
@@ -373,7 +373,7 @@ function getDesktopGeometry() {
async function doKillAllOldDesktopProcesses() {
const procFolder = Gio.File.new_for_path('/proc');
const processes = await FileUtils.enumerateDir(procFolder);
- const thisPath = `gjs ${GLib.build_filenamev([
+ const thisPath = `@gjs@/bin/gjs ${GLib.build_filenamev([
ExtensionUtils.getCurrentExtension().path,
'app',
'ding.js',
@@ -397,7 +397,7 @@ async function doKillAllOldDesktopProcesses() {
}
if (contents.startsWith(thisPath)) {
- let proc = new Gio.Subprocess({ argv: ['/bin/kill', filename] });
+ let proc = new Gio.Subprocess({ argv: ['@util_linux@/bin/kill', filename] });
proc.init(null);
print(`Killing old DING process ${filename}`);
await proc.wait_async_promise(null);
diff --git a/prefs.js b/prefs.js
index 1ad0cad..d830f11 100644
--- a/prefs.js
+++ b/prefs.js
@@ -46,7 +46,8 @@ function fillPreferencesWindow(window) {
let schemaSource = GioSSS.get_default();
let schemaGtk = schemaSource.lookup(Enums.SCHEMA_GTK, true);
let gtkSettings = new Gio.Settings({ settings_schema: schemaGtk });
- let schemaNautilus = schemaSource.lookup(Enums.SCHEMA_NAUTILUS, true);
+ const schemaSourceNautilus = Gio.SettingsSchemaSource.new_from_directory('@nautilus_gsettings_path@', Gio.SettingsSchemaSource.get_default(), true);
+ let schemaNautilus = schemaSourceNautilus.lookup(Enums.SCHEMA_NAUTILUS, true);
let nautilusSettings;
if (!schemaNautilus)
nautilusSettings = null;
if (contents.startsWith(thisPath)) {
- let proc = new Gio.Subprocess({argv: ['/bin/kill', filename]});
+ let proc = new Gio.Subprocess({argv: ['@util_linux@/bin/kill', filename]});
proc.init(null);
print(`Killing old DING process ${filename}`);
await proc.wait_async_promise(null);
@@ -1,14 +1,13 @@
diff --git i/sensors.js w/sensors.js
index 5ab7068..00cfa19 100644
--- i/sensors.js
+++ w/sensors.js
@@ -29,6 +29,9 @@ const Me = imports.misc.extensionUtils.getCurrentExtension();
const FileModule = Me.imports.helpers.file;
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
const _ = Gettext.gettext;
+
diff --git a/sensors.js b/sensors.js
index 39d175a..9815b77 100644
--- a/sensors.js
+++ b/sensors.js
@@ -29,6 +29,8 @@ import * as FileModule from './helpers/file.js';
import { gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js';
import NM from 'gi://NM';
+imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@');
+
const NM = imports.gi.NM;
let GTop, hasGTop = true;
try {
({default: GTop} = await import('gi://GTop'));
@@ -6,12 +6,17 @@
# - Make a separate section for each GNOME version. Collisions will come back eventually
# as the extensions are updated.
{
# ####### GNOME 44 #######
# ####### GNOME 45 #######
"apps-menu@gnome-shell-extensions.gcampax.github.com" = "applications-menu";
"Applications_Menu@rmy.pobox.com" = "frippery-applications-menu";
# ############################################################################
# These are conflicts for older extensions (i.e. they don't support the latest GNOME version).
# Make sure to move them up once they are updated
# ####### GNOME 44 #######
"workspace-indicator@gnome-shell-extensions.gcampax.github.com" = "workspace-indicator";
"horizontal-workspace-indicator@tty2.io" = "workspace-indicator-2";
@@ -30,10 +35,6 @@
"batime@martin.zurowietz.de" = "battery-time";
"batterytime@typeof.pw" = "battery-time-2";
# ############################################################################
# These are conflicts for older extensions (i.e. they don't support the latest GNOME version).
# Make sure to move them up once they are updated
# ####### GNOME 43 #######
"lockkeys@vaina.lt" = "lock-keys";
File diff suppressed because one or more lines are too long
@@ -20,6 +20,7 @@ supported_versions = {
"42": "42",
"43": "43",
"44": "44",
"45": "45",
}
# Some type alias to increase readability of complex compound types
+1
View File
@@ -38712,6 +38712,7 @@ with pkgs;
gnome42Extensions
gnome43Extensions
gnome44Extensions
gnome45Extensions
;
gnome-connections = callPackage ../desktops/gnome/apps/gnome-connections { };