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.
This commit is contained in:
Noah Fontes 2022-07-21 13:05:57 -07:00
parent e2b34f0f11
commit 7e0d8135dd
No known key found for this signature in database
GPG key ID: 85B8C0A0B15FF53F

View file

@ -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