nixpkgs/pkgs/desktops/gnome
Jan Tojnar af9e3ddc1d gnome.gpaste: Fix typelib path modification
- GPaste 45 switched to ES6 modules.
- Imports in an ES6 module are resolved before the statements in the module body are evaluated.
- If we want our typelib path modification to take effect, we need to do it before the typelibs are imported.

One option is delaying further imports with a top-level await of dynamic import.
I did that in 33cb221792
But forgot to do it in `extension.js`, causing the extensions to sometimes fail to start:

    JS ERROR: Extension GPaste@gnome-shell-extensions.gnome.org: Error: Requiring GPaste, version 2: Typelib file for namespace 'GPaste', version '2' not found
        require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
        @gi://GPaste?version=2:3:25
        @resource:///org/gnome/shell/ui/init.js:21:20

Not sure how it can sometimes work.

I could apply the transformation to `extension.js` as well
but there are multiple imports in the file so it would be pretty annoying
since any import that transitively imports typelibs would need to be converted.

Since gjs currently appears to load imports synchronously
and module bodies are executed when all imports are resolved (post-order),
we can instead just create a separate module and import it first.
2023-11-27 14:42:29 +01:00
..
apps gnome.ghex: 45.0 → 45.1 2023-11-21 08:42:47 +01:00
core gnome.gucharmap: 15.0.4 → 15.1.2 2023-11-21 08:42:51 +01:00
devtools gnome.gnome-devel-docs: remove 2022-10-26 20:18:25 +02:00
extensions gnomeExtensions.freon: fix patch 2023-11-22 16:19:29 +01:00
games gnome.aisleriot: 3.22.29 → 3.22.30 2023-11-21 08:42:50 +01:00
misc gnome.gpaste: Fix typelib path modification 2023-11-27 14:42:29 +01:00
nixos/gsettings-overrides gnome.nixos-gsettings-overrides: Ensure the settings are not overwritten 2022-10-21 11:49:58 +02:00
default.nix gnome.gnome-panel-with-modules: init 2023-10-06 18:22:07 +08:00
find-latest-version.py gnome.updateScript: Add more type annotations 2022-10-25 16:23:42 +02:00
gdk-pixbuf-cache-builder.nix gnome._gdkPixbufCacheBuilder_DO_NOT_USE: Extract from nixos/gdk-pixbuf 2022-10-21 10:06:24 +02:00
installer.nix
update.nix gnome.updateScript: Prevent downgrading packages 2022-10-25 15:14:02 +02:00