First, it is possible to disable the version validation using gsettings set org.gnome.shell disable-extension-version-validation true
. Just note that using incompatible extensions might cause shell instability or other issues.
Then you can run journalctl -xeaf
and check logs for errors occurring on enabling the extension and throughout its use. You should note the errors and warnings you discover, as well as the interactions leading to them when reporting upstream.
If I want to tweak the extension source to help porting it to a new shell version, I typically clone its repository locally and then apply a patch like this to my local Nixpkgs checkout:
--- a/pkgs/desktops/gnome/extensions/sound-output-device-chooser/default.nix
+++ b/pkgs/desktops/gnome/extensions/sound-output-device-chooser/default.nix
@@ -9,12 +9,7 @@ stdenv.mkDerivation rec {
pname = "gnome-shell-extension-sound-output-device-chooser";
version = "39";
- src = fetchFromGitHub {
- owner = "kgshank";
- repo = "gse-sound-output-device-chooser";
- rev = version;
- sha256 = "sha256-RFdBdpKsz2MjdzxWX4UFwah+e68dqrkvm7ql0RAZZwg=";
- };
+ src = /home/jtojnar/Projects/gse-sound-output-device-chooser;
patches = [
# Fix paths to libpulse and python
Then I install the extension using nix-env -f . gnomeExtensions.sound-output-device-chooser
and restart the shell by pressing Alt-F2 and entering r
into the entry (only works in Xorg session, unfortunately).
dbus-run-session -- gnome-shell --nested
might also work for some lighter testing.
Unfortunately, this is much less convenient for automatically packaged extensions, as you basically need to re-create the manual packaging. For example, for transparent-window-moving
:
--- a/pkgs/desktops/gnome/extensions/extensionOverrides.nix
+++ b/pkgs/desktops/gnome/extensions/extensionOverrides.nix
@@ -1,6 +1,7 @@
{ lib
, ddcutil
, gjs
+, glib
, xprop
}:
# A set of overrides for automatically packaged extensions that require some small fixes.
@@ -11,6 +12,20 @@
# the upstream repository's sources.
super: super // {
+ "transparent-window-moving@noobsai.github.com" = super."transparent-window-moving@noobsai.github.com".overrideAttrs (old: {
+ src = /home/jtojnar/Projects/transparent-window-moving;
+ nativeBuildInputs = [
+ glib # for glib-compile-schemas
+ ];
+ makeFlags = [
+ "EXTENSIONDIR=${placeholder "out"}/share/gnome-shell/extensions"
+ ];
+ # Override the default attributes set by buildShellExtension.
+ version = "9";
+ dontBuild = false;
+ installPhase = null;
+ });
+
"dash-to-dock@micxgx.gmail.com" = super."dash-to-dock@micxgx.gmail.com".overrideAttrs (old: {
meta.maintainers = with lib.maintainers; [ eperuffo jtojnar rhoriguchi ];
});
Alternately, you can just get the source from the extension portal using cp -r $(nix-build -A gnomeExtensions.transparent-window-moving.src) transparent-window-moving && chmod -R +w transparent-window-moving
and just point src
attribute in extensionOverrides.nix
to that but then you might have harder time porting the changes back to the original source code.