From b0a6721b1d57febd79942f414eaa4096197e6086 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 22 Jun 2024 13:25:28 +0200 Subject: [PATCH] gnome: Mention that the scope should not get new packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mainly, the consensus of GNOME maintainers a long time ago was that the scope is more trouble than it’s worth: - Overlays are even harder (`overrideScope` required). - Referring to non-leaf packages outside the scope is annoying – `callPackage` can only inject the scope, and overriding the dependencies requires modifying the scope. - Attributes already have `gnome-` as prefix so it would be duplicated in the scope name. - Selection criteria are unclear – should this just be core package set? - Upstream package status is fluent – what should we do if an app becomes a part of core, what if it gets removed? - Main benefit was ability to update all GNOME packages at once but we still needed to do libraries like GLib or GTK manually. Nowadays we use [predicate matching on `updateScript` name](https://github.com/NixOS/nixpkgs/blob/517d8466ca9e858f12ba1a99c5e6ae355dbc45c1/maintainers/scripts/update.nix#L165) but there is still room for improvement (e.g. adding tags). --- pkgs/desktops/gnome/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/desktops/gnome/default.nix b/pkgs/desktops/gnome/default.nix index 85a78c6d18fd..e0aedd09f4d9 100644 --- a/pkgs/desktops/gnome/default.nix +++ b/pkgs/desktops/gnome/default.nix @@ -1,5 +1,6 @@ { config, pkgs, lib }: +# NOTE: New packages should generally go to top-level instead of here! lib.makeScope pkgs.newScope (self: with self; { updateScript = callPackage ./update.nix { };