Unverified Commit 9c55b12a authored by Jan Tojnar's avatar Jan Tojnar Committed by GitHub
Browse files

Merge gnome48Extensions: init (#403591)

parents 1a5f51a7 697c5471
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -121,11 +121,14 @@ import ./make-test-python.nix (
            #   "${run "gsettings set org.gnome.shell disable-extension-version-validation true"}"
            # )

        # Assert that some extension is in a specific state
        def checkState(target, extension):
            state = machine.succeed(
        def getState(extension):
            return machine.succeed(
                f"${run "gnome-extensions info {extension}"} | grep '^  State: .*$'"
            )

        # Assert that some extension is in a specific state
        def checkState(target, extension):
            state = getState(extension)
            assert target in state, f"{state} instead of {target}"

        def checkExtension(extension, disable):
@@ -143,6 +146,10 @@ import ./make-test-python.nix (
                # Enable and optionally disable

                machine.succeed(f"${run "gnome-extensions enable {extension}"}")
                wait_time = 5
                while getState(extension) == "ACTIVATING" and (wait_time := wait_time - 1) > 0:
                    machine.log(f"Extension {extension} is still activating, waiting {wait_time} more seconds")
                    machine.sleep(1)
                checkState("ACTIVE", extension)

                if disable:
+14 −9
Original line number Diff line number Diff line
# GNOME Shell extensions

All extensions are packaged automatically. They can be found in the `pkgs.gnomeXYExtensions` for XY being a GNOME version. The package names are the extension’s UUID, which can be a bit unwieldy to use. `pkgs.gnomeExtensions` is a set of manually curated extensions that match the current `gnome.gnome-shell` versions. Their name is human-friendly, compared to the other extensions sets. Some of its extensions are manually packaged.
All extensions are packaged automatically. They can be found in the `pkgs.gnomeXYExtensions` for XY being a GNOME version. The package names are the extension’s UUID, which can be a bit unwieldy to use. `pkgs.gnomeExtensions` is a set of manually curated extensions that match the current `pkgs.gnome-shell` versions. Their name is human-friendly, compared to the other extensions sets. Some of its extensions are manually packaged.

## Automatically packaged extensions

@@ -8,19 +8,24 @@ The actual packages are created by `buildGnomeExtension.nix`, provided the corre

### Extensions updates

For everyday updates,
#### For everyday updates,

1. Run `update-extensions.py`.
2. Update `extensionRenames.nix` according to the comment at the top.

For GNOME updates,
#### To package the extensions for new GNOME version,

1. Add a new `gnomeXYExtensions` set
2. Remove old ones for GNOME versions we don’t want to support any more
3. Update `supported_versions` in `./update-extensions.py` and re-run it
4. Change `gnomeExtensions` to the new version
5. Update `./extensionsRenames.nix` accordingly
6. Update `all-packages.nix` accordingly (grep for `gnomeExtensions`)
1. Add a new `gnomeXYExtensions` set in `default.nix`.
2. Update `all-packages.nix` accordingly. (grep for `gnomeExtensions`)
3. Update `supported_versions` in `update-extensions.py`.
4. Follow the [For everyday updates](#for-everyday-updates) section.

#### For GNOME updates,

1. Follow the [To package the extensions for new GNOME version](#to-package-the-extensions-for-new-gnome-version) section if required.
2. Update `versions_to_merge` variable in `./update-extensions.py`.
3. Run `update-extensions.py --skip-fetch`, and update `extensionRenames.nix` according to the comment at the top.
4. Update `gnomeExtensions` in `default.nix` to the new versions.

## Manually packaged extensions

+13 −12
Original line number Diff line number Diff line
@@ -4,25 +4,26 @@
    "apps-menu@gnome-shell-extensions.gcampax.github.com"
  ],
  "persian-calendar": [
    "persian-calendar@iamrezamousavi.gmail.com",
    "PersianCalendar@oxygenws.com"
    "PersianCalendar@oxygenws.com",
    "persian-calendar@iamrezamousavi.gmail.com"
  ],
  "system-monitor": [
    "system-monitor@gnome-shell-extensions.gcampax.github.com",
    "System_Monitor@bghome.gmail.com"
    "System_Monitor@bghome.gmail.com",
    "system-monitor@gnome-shell-extensions.gcampax.github.com"
  ],
  "fuzzy-clock": [
    "fuzzy-clock@keepawayfromfire.co.uk",
    "FuzzyClock@fire-man-x",
    "FuzzyClock@johngoetz",
    "FuzzyClock@fire-man-x"
    "fuzzy-clock@keepawayfromfire.co.uk"
  ],
  "battery-time": [
    "batterytime@typeof.pw",
    "batime@martin.zurowietz.de"
    "batime@martin.zurowietz.de",
    "battery-time@eetumos.github.com",
    "batterytime@typeof.pw"
  ],
  "nepali-calendar": [
    "nepali-date@biplab",
    "nepali-calendar-gs-extension@subashghimire.info.np"
    "nepali-calendar-gs-extension@subashghimire.info.np",
    "nepali-date@biplab"
  ],
  "mouse-follows-focus": [
    "mouse-follows-focus@crisidev.org",
@@ -33,8 +34,8 @@
    "power-profile@fthx"
  ],
  "fullscreen-to-empty-workspace": [
    "fullscreen-to-empty-workspace@aiono.dev",
    "fullscreen-to-empty-workspace2@corgijan.dev"
    "fullscreen-to-empty-workspace2@corgijan.dev",
    "fullscreen-to-empty-workspace@aiono.dev"
  ],
  "eur-usd": [
    "eur-usd-gshell@vezza.github.com",
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ rec {
  gnome45Extensions = mapUuidNames (produceExtensionsList "45");
  gnome46Extensions = mapUuidNames (produceExtensionsList "46");
  gnome47Extensions = mapUuidNames (produceExtensionsList "47");
  gnome48Extensions = mapUuidNames (produceExtensionsList "48");

  # Keep the last three versions in here
  gnomeExtensions = lib.trivial.pipe (gnome45Extensions // gnome46Extensions // gnome47Extensions) [
+7 −1
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@
  vte,
  wrapGAppsHook3,
  xdg-utils,
  gtk4,
  desktop-file-utils,
  xdg-user-dirs,
}:
let
  # Helper method to reduce redundancy
@@ -128,7 +131,10 @@ lib.trivial.pipe super [
        inherit gjs;
        util_linux = util-linux;
        xdg_utils = xdg-utils;
        nautilus_gsettings_path = "${glib.getSchemaPath nautilus}";
        gtk_update_icon_cache = "${gtk4.out}/bin/gtk4-update-icon-cache";
        update_desktop_database = "${desktop-file-utils.out}/bin/update-desktop-database";
        xdg_user_dirs = lib.getExe xdg-user-dirs;
        nautilus_gsettings_path = glib.getSchemaPath nautilus;
      })
    ];
  }))
Loading