summary refs log tree commit diff
path: root/pkgs/desktops/mate
diff options
context:
space:
mode:
authorNoah Fontes <noah@noahfontes.com>2022-07-21 13:05:57 -0700
committerNoah Fontes <noah@noahfontes.com>2022-07-21 13:05:57 -0700
commit7e0d8135dd0877a0ce47d3b17fc055475f4a65ca (patch)
tree466355795eb953dc2e2cae92f257b4ee38d46e84 /pkgs/desktops/mate
parente2b34f0f11ed8ad83d9ec9c14260192c3bcccb0d (diff)
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.
Diffstat (limited to 'pkgs/desktops/mate')
-rw-r--r--pkgs/desktops/mate/default.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/desktops/mate/default.nix b/pkgs/desktops/mate/default.nix
index d52066be3f26c..092d113465522 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