Unverified Commit a0b8caf3 authored by Silvan Mosberger's avatar Silvan Mosberger Committed by GitHub
Browse files

Revert "lib.customisation: uncurry makeScopeWithSplicing"

parent 49b4b4e8
Loading
Loading
Loading
Loading
+8 −14
Original line number Diff line number Diff line
@@ -279,15 +279,7 @@ rec {

  /* Like the above, but aims to support cross compilation. It's still ugly, but
     hopefully it helps a little bit. */
  makeScopeWithSplicing =
    { splicePackages
    , newScope
    }:
    { otherSplices
    , keep ? (_self: {})
    , extra ? (_spliced0: {})
    , f
    }:
  makeScopeWithSplicing = splicePackages: newScope: otherSplices: keep: extra: f:
    let
      spliced0 = splicePackages {
        pkgsBuildBuild = otherSplices.selfBuildBuild;
@@ -303,11 +295,13 @@ rec {
        callPackage = newScope spliced; # == self.newScope {};
        # N.B. the other stages of the package set spliced in are *not*
        # overridden.
        overrideScope = g: (makeScopeWithSplicing
          { inherit splicePackages newScope; }
          { inherit otherSplices keep extra;
            f = lib.fixedPoints.extends g f;
          });
        overrideScope = g: makeScopeWithSplicing
          splicePackages
          newScope
          otherSplices
          keep
          extra
          (lib.fixedPoints.extends g f);
        packages = f;
      };
    in self;
+11 −5
Original line number Diff line number Diff line
@@ -5,9 +5,16 @@
, makeScopeWithSplicing
}:

makeScopeWithSplicing {
  otherSplices = generateSplicesForMkScope "xfce";
  f = (self:
let
  keep = _self: { };
  extra = _spliced0: { };

in
makeScopeWithSplicing
  (generateSplicesForMkScope "xfce")
  keep
  extra
  (self:
    let
      inherit (self) callPackage;
    in
@@ -170,5 +177,4 @@ makeScopeWithSplicing {
      thunar-bare = self.thunar.override { thunarPlugins = [ ]; }; # added 2019-11-04

      xfce4-hardware-monitor-plugin = throw "xfce.xfce4-hardware-monitor-plugin has been removed: abandoned by upstream and does not build"; # added 2023-01-15
    });
}
    })
+7 −4
Original line number Diff line number Diff line
@@ -39,15 +39,18 @@ let
            selfHostHost = luaOnHostForHost.pkgs;
            selfTargetTarget = luaOnTargetForTarget.pkgs or {};
          };
          keep = self: { };
          extra = spliced0: {};
          extensions = lib.composeManyExtensions [
            generatedPackages
            overriddenPackages
            overrides
          ];
        in makeScopeWithSplicing {
          inherit otherSplices;
          f = lib.extends extensions luaPackagesFun;
        })
        in makeScopeWithSplicing
          otherSplices
          keep
          extra
          (lib.extends extensions luaPackagesFun))
        {
          overrides = packageOverrides;
          lua = self;
+7 −4
Original line number Diff line number Diff line
@@ -34,10 +34,13 @@ let
            selfHostHost = perlOnHostForHost.pkgs;
            selfTargetTarget = perlOnTargetForTarget.pkgs or {};
          };
        in makeScopeWithSplicing {
          inherit otherSplices;
          f = perlPackagesFun;
        })
          keep = self: { };
          extra = spliced0: {};
        in makeScopeWithSplicing
          otherSplices
          keep
          extra
          perlPackagesFun)
        {
          perl = self;
        };
+7 −4
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
      };
      hooks = import ./hooks/default.nix;
      keep = lib.extends hooks pythonPackagesFun;
      extra = _: {};
      optionalExtensions = cond: as: lib.optionals cond as;
      pythonExtension = import ../../../top-level/python-packages.nix;
      python2Extension = import ../../../top-level/python2-packages.nix;
@@ -59,10 +60,12 @@
        overrides
      ]);
      aliases = self: super: lib.optionalAttrs config.allowAliases (import ../../../top-level/python-aliases.nix lib self super);
    in makeScopeWithSplicing {
      inherit otherSplices keep;
      f = lib.extends (lib.composeExtensions aliases extensions) keep;
    }) {
    in makeScopeWithSplicing
      otherSplices
      keep
      extra
      (lib.extends (lib.composeExtensions aliases extensions) keep))
    {
      overrides = packageOverrides;
      python = self;
    });
Loading