From 7e0d8135dd0877a0ce47d3b17fc055475f4a65ca Mon Sep 17 00:00:00 2001 From: Noah Fontes Date: Thu, 21 Jul 2022 13:05:57 -0700 Subject: [PATCH] mate: expose all packages in a scope MATE currently uses a scope, but it doesn't actually expose that scope to callers, which makes overriding packages in overlays quite difficult as you have to figure out where each package is plumbed through in the attrset. You end up with contrived expressions like: mate = super.mate // { # ... extraPackages = (self.lib.remove super.mate.whatever super.mate.extraPackages) ++ [ self.mate.whatever ]; }; This change exposes the scope so that we can use overrideScope' in overlays instead. --- pkgs/desktops/mate/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/desktops/mate/default.nix b/pkgs/desktops/mate/default.nix index d52066be3f26..092d11346552 100644 --- a/pkgs/desktops/mate/default.nix +++ b/pkgs/desktops/mate/default.nix @@ -1,9 +1,7 @@ -{ pkgs, newScope }: +{ pkgs, lib }: let - callPackage = newScope self; - - self = rec { + packages = self: with self; { # Update script tailored to mate packages from git repository mateUpdateScript = { pname, version, odd-unstable ? true, rev-prefix ? "v", url ? null }: @@ -101,4 +99,4 @@ let }; -in self +in lib.makeScope pkgs.newScope packages