pkgs/overlays/unstable-from-source: remove unnecesary function

This commit is contained in:
Wroclaw 2025-05-30 20:58:02 +02:00
parent 4aa8236957
commit 91e4fdba56

View file

@ -15,26 +15,26 @@ let
"parsed" "parsed"
]; ];
unstablePkgsForNixpkgs = nixpkgs: import unstableSource { unstablePkgs = import unstableSource {
# localSystem -> pkgs.stdenv.buildPlatform # localSystem -> pkgs.stdenv.buildPlatform
localSystem = sanitizePlatform nixpkgs.stdenv.buildPlatform; localSystem = sanitizePlatform self.stdenv.buildPlatform;
# crossSystem -> pkgs.stdenv.hostPlatform or pkgs.stdenv.targetPlatform ?? # crossSystem -> pkgs.stdenv.hostPlatform or pkgs.stdenv.targetPlatform ??
# passing below # passing below
# config -> pkgs.config # config -> pkgs.config
config = nixpkgs.config; config = self.config;
# overlays -> partial of pkgs.overlays # overlays -> partial of pkgs.overlays
overlays = nixpkgs.overlays; overlays = self.overlays;
# crossOverlays -> partial of pkgs.overlays # crossOverlays -> partial of pkgs.overlays
# crossOverlays are merged to overlays, not sure what issues that might raise. # crossOverlays are merged to overlays, not sure what issues that might raise.
# ignoring. # ignoring.
} // self.lib.optionalAttrs ( } // self.lib.optionalAttrs (
self.lib.systems.equals nixpkgs.stdenv.buildPlatform nixpkgs.stdenv.hostPlatform self.lib.systems.equals self.stdenv.buildPlatform self.stdenv.hostPlatform
) { ) {
# workaround for some odd structured packages that changes behaviour # workaround for some odd structured packages that changes behaviour
# when crossSystem is passed. # when crossSystem is passed.
crossSystem = sanitizePlatform nixpkgs.stdenv.hostPlatform; crossSystem = sanitizePlatform self.stdenv.hostPlatform;
}; };
in in
{ {
"${attributeName}" = if useUnstable then unstablePkgsForNixpkgs self else self; "${attributeName}" = if useUnstable then unstablePkgs else self;
} }