Open ajgrf opened 6 months ago
Afaik this comes from the GNOME 45 extensions upgrade that removes this bit https://github.com/NixOS/nixpkgs/commit/fc495aea1faba0c33055011ec6df963571717684#diff-a93586f7df89823a97c3e23088ceca4e124bc952d9f38d0f6522b58689ab0f34L100-L107
Will quickly test and report back
Right, so patching that solves half the issue, but now there's some wrapper weirdness going on here due to the wrapGApp
bit as the shebang isn't correctly set from #!/usr/bin/env -S gjs -m
:
ding.js
...
# ------------------------------------------------------------------------------------
# The C-code for this binary wrapper has been generated using the following command:
...
# (Use `nix-shell -p makeBinaryWrapper` to get access to makeCWrapper in your shell)
# ------------------------------------------------------------------------------------
....
.ding.js-wrapped
#!/nix/store/zx8aqgdy735qzk81glfwil6mbi6ddqb1-coreutils-9.4/bin/env -S -m
Thanks for looking into this, @4JX. Did you manage to get the extension working, or is the shebang problem you mentioned still unsolved? Would you mind pushing your changes to GitHub (even if they're not ready for a PR)?
Shebang issue is a problem that I've yet to solve should the "fix" proceed by un-removing the patch section, using this branch for testing.
I need to toy around with wrapGApp
as I've not used it before, as I cannot rule whether the wrapper itself might be broken or if maybe something else is going on, given that the only other extension to use that still manually fixes the gjs
paths beforehand.
cc @piegamesde, can you explain were the changes meant to do?
Uhm, I think I'll have to delegate this up the competence chain, CC @jtojnar
But as far as I understand, wrapGApp
only fixes shebangs, and if the code inside the script does something inappropriate it still needs to be patched manually. That's what the other extension does: its script internally does an exec gjs
of which the path needs to be fixed.
But as far as I understand,
wrapGApp
only fixes shebangs, and if the code inside the script does something inappropriate it still needs to be patched manually. That's what the other extension does: its script internally does anexec gjs
of which the path needs to be fixed.
The part about shebangs is incorrect, it does not touch shebangs at all – it creates a new executable file in place of the original one that invokes the original one with extra environment variables.
Notably, the new file on that path (the wrapper) will no longer be a JS file, which causes issues when the extension assumes the original file is a script and tries to execute gjs path/to/file.js
,
Updated the commit, currently at:
Dec 18 22:21:32 terra gnome-shell[3042]: Gtk4-DING: (gjs:10813): GLib-CRITICAL **: 22:21:32.719: g_once_init_leave: assertion 'result != 0' failed
Dec 18 22:21:32 terra gnome-shell[3042]: Gtk4-DING: (gjs:10813): GLib-GObject-CRITICAL **: 22:21:32.719: cannot add private field to invalid (non-instantiatable) type '<invalid>'
Dec 18 22:21:32 terra gnome-shell[3042]: Gtk4-DING: (gjs:10813): GLib-GObject-CRITICAL **: 22:21:32.719: cannot register existing type 'GCancellable'
Dec 18 22:21:32 terra gnome-shell[3042]: Gtk4-DING: (gjs:10813): GLib-GObject-CRITICAL **: 22:21:32.719: g_param_spec_pool_lookup: assertion 'pool != NULL' failed
Dec 18 22:21:32 terra gnome-shell[3042]: Gtk4-DING: (gjs:10813): GLib-GObject-CRITICAL **: 22:21:32.719: g_param_spec_pool_insert: assertion 'pool != NULL' failed
Dec 18 22:21:32 terra gnome-shell[3042]: Gtk4-DING: (gjs:10813): GLib-GObject-CRITICAL **: 22:21:32.719: g_param_spec_pool_lookup: assertion 'pool != NULL' failed
Which escapes my realm of knowledge. Might be related to my QT/GTK hacked together setup but that's just speculation on my part.
The latest version of gtk4-desktop-icons-ng-ding is 70. Can updating to latest fix it?
Seems like that did the trick, there's still
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: GNOME nautilus 45.2.1
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: ** Message: 00:27:07.327: Connecting to org.freedesktop.Tracker3.Miner.Files
Jan 20 00:27:07 terra .file-roller-wr[2435276]: Using GtkSettings:gtk-application-prefer-dark-theme together with HdyStyleManager is unsupported. Please use HdyStyleManager:color-scheme instead.
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: _init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: @file:///nix/store/5l84jh85bvg60a93p5a1254s24lgycd0-gnome-shell-extension-gtk4-desktop-icons-ng-ding-70/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/.ding.js-wrapped:258:21
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: @file:///nix/store/5l84jh85bvg60a93p5a1254s24lgycd0-gnome-shell-extension-gtk4-desktop-icons-ng-ding-70/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/.ding.js-wrapped:238:26
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: DesktopManager@file:///nix/store/5l84jh85bvg60a93p5a1254s24lgycd0-gnome-shell-extension-gtk4-desktop-icons-ng-ding-70/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/desktopManager>
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: init@file:///nix/store/5l84jh85bvg60a93p5a1254s24lgycd0-gnome-shell-extension-gtk4-desktop-icons-ng-ding-70/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/preferences.js:143:14
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: _monitorTerminalSettings@file:///nix/store/5l84jh85bvg60a93p5a1254s24lgycd0-gnome-shell-extension-gtk4-desktop-icons-ng-ding-70/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/pref>
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: _updateTerminalSettings@file:///nix/store/5l84jh85bvg60a93p5a1254s24lgycd0-gnome-shell-extension-gtk4-desktop-icons-ng-ding-70/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/prefe>
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: (gjs:2435259): Gjs-WARNING **: 00:27:07.295: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await >
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Gtk4-DING: Gjs-Console-Message: 00:27:07.291: Detected async api for thumbnails
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: com.desktop.dingextension DBus Name Acquired
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: gtk4-DING enabled.
Jan 20 00:27:07 terra .gnome-shell-wr[2433988]: Launching Gtk4-DING process
But it doesn't seem nixos related and the extension appears to work
Nixpkgs branch: https://github.com/4JX/nixpkgs/tree/gtk4-ding70 And personal setup commit: https://github.com/4JX/nixos-config/commit/102de5557ea07e1f581c779dd07ccfb2d2f2aa90
Will make a proper PR once https://github.com/NixOS/nixpkgs/pull/282143/ is merged, as it contains the necessary version update
Would it work now?
Would it work now?
It should (mostly), though there's always the possibility of something breaking as new updates come along. Feel free to report any issues.
To make settings work, I had to add gjs
to environment.systemPackages
. NOw settings don't show any error but nothing appear on desktop still (even after reboot).
I read on gitlab that I should also add
services.xserver.desktopManager.gnome.extraGSettingsOverridePackages = with pkgs; [
gnome.nautilus # needed for gtk4-desktop-icons-ng-ding gnome extension
#gnome.mutter # should not be needed
#gtk4 # should not be needed
];
but it didn't help neither. Should I uncomment gnome.mutter
and gtk4
?
Sounds like you are installing the extension via the extension manager? You should be using gnomeExtensions.gtk4-desktop-icons-ng-ding
Here is how I installed it :
{ config, pkgs, lib, inputs, ... }:
environment.systemPackages = with pkgs; [
gnomeExtensions.gtk4-desktop-icons-ng-ding
gjs # needed for gtk4-desktop-icons-ng-ding
];
and I tried with that also, but now it's commented and I don't see the difference :
# services.xserver.desktopManager.gnome.extraGSettingsOverridePackages = with pkgs; [
# gnome.nautilus # needed for gtk4-desktop-icons-ng-ding gnome extension
#gnome.mutter # should not be needed
#gtk4 # should not be needed
# ];
anyway, 23.11 is over soon so maybe it will work with 24.05 and version 71 (instead of version 68 in 23.11).
anyway, 23.11 is over soon so maybe it will work with 24.05 and version 71 (instead of version 68 in 23.11)
Ah, that confirms my other hunch.
The patch was made against version 70 (now at 71, but should still work), which means the stable nixos branch doesnt have the required changes, as usually there aren't backports for extension updates/fixes.
You should be able to pull the extension packages from nixos-unstable
while keeping your overall system on 23.11
if that floats your boat. Flake inputs are best for this, instead of using overlays.
Or you can also just wait till a new release is made, though then you'll again be behind on extensions updates till the next release.
@4JX
Hi, I am using this extension from unstable channel and it's version is currently 73, but it still doesn't work for me. What can I try to do to fix it?
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: gtk4-DING enabled.
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: com.desktop.dingextension DBus Name Acquired
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: Gtk4-DING: (gjs:12464): GLib-GObject-CRITICAL **: 16:45:43.272: g_param_spec_pool_lookup: assertion 'pool != NULL' failed
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: Gtk4-DING: (gjs:12464): GLib-GObject-CRITICAL **: 16:45:43.272: g_param_spec_pool_insert: assertion 'pool != NULL' failed
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: Gtk4-DING: (gjs:12464): GLib-GObject-CRITICAL **: 16:45:43.272: g_param_spec_pool_lookup: assertion 'pool != NULL' failed
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: Gtk4-DING: (gjs:12464): GLib-GObject-CRITICAL **: 16:45:43.272: cannot register existing type 'GCancellable'
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: Gtk4-DING: (gjs:12464): GLib-GObject-CRITICAL **: 16:45:43.272: cannot add private field to invalid (non-instantiatable) type '<invalid>'
Apr 18 16:45:43 ms-7d48 .gnome-shell-wr[7951]: Gtk4-DING: (gjs:12464): GLib-CRITICAL **: 16:45:43.272: g_once_init_leave: assertion 'result != 0' failed
Hi, I am using this extension from unstable channel and it's version is currently 73, but it still doesn't work for me. What can I try to do to fix it?
No idea, I myself got stuck there before.
PS: To the people following this thread I do not actively use this extension, but the fixes in the past have been easy enough that I could tackle them as part of my own housekeeping. Would appreciate if someone else took over looking at this.
@4JX
Thanks for your help, especially since you don't actively use the extension!
It seems the extension from Unstable (rev 25865a40d14b3f9cf19f19b924e2ab4069b09588
) which is version 78 and has version-name 75 doesn't work properly and shows the following error:
┌─ gnome-shell/extensions/gtk4-ding@smedius.gitlab.com via
└─> ./app/ding.js
(gjs:180255): Gjs-CRITICAL **: 11:47:11.842: JS ERROR: Error: Requiring Adw, version none: Typelib file for namespace 'Adw' (any version) not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
@gi://Adw/:3:25
(gjs:180255): Gjs-CRITICAL **: 11:47:11.842: Module file:///home/andreas/Downloads/nixpkgs/result/share/gnome-shell/extensions/gtk4-ding@smedius.gitlab.com/app/ding.js threw an exception
Do you have any experience with this?
I've tried to modify the override to the following, but unfortunately the same issue occurs.
(patchExtension "gtk4-ding@smedius.gitlab.com" (old: {
nativeBuildInputs = [ wrapGAppsHook3 ];
buildInputs = [ pkgs.libadwaita ];
patches = [
(substituteAll {
inherit gjs util-linux xdg-utils;
util_linux = util-linux;
xdg_utils = xdg-utils;
src = ./extensionOverridesPatches/gtk4-ding_at_smedius.gitlab.com.patch;
nautilus_gsettings_path = "${glib.getSchemaPath gnome.nautilus}";
})
];
}))
Describe the bug
The GNOME Shell extension
gnomeExtensions.gtk4-desktop-icons-ng-ding
doesn't seem to work on the latest NixOS 23.11 release.Steps To Reproduce
Steps to reproduce the behavior:
gnomeExtensions.gtk4-desktop-icons-ng-ding
on NixOS 23.11 (or probably NixOS unstable as well).Expected behavior
Icons should appear on the desktop.
Additional context
Opening the extension settings produces the following error:
Notify maintainers
@piegamesde @jtojnar @4JX
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.