Loading pkgs/test/top-level/default.nix +18 −0 Original line number Diff line number Diff line Loading @@ -64,4 +64,22 @@ lib.recurseIntoAttrs { assert lib.all (p: p.stdenv.buildPlatform == p.stdenv.hostPlatform) pkgsLocal; assert lib.all (p: p.stdenv.buildPlatform != p.stdenv.hostPlatform) pkgsCross; pkgs.emptyFile; # appendOverlays must preserve splicing so that cross-compilation # works in NixOS modules (which go through appendOverlays via nixpkgs.nix). appendOverlaysPreservesSplicing = let cross = nixpkgsFun { localSystem = { system = "x86_64-linux"; }; crossSystem = { system = "aarch64-linux"; }; }; appended = cross.appendOverlays [ ]; in assert cross.makeWrapper ? __spliced; assert appended.makeWrapper ? __spliced; pkgs.emptyFile; } pkgs/top-level/stage.nix +4 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,10 @@ let # in one go when calling Nixpkgs, for performance and simplicity. appendOverlays = extraOverlays: if extraOverlays == [ ] then self else nixpkgsFun { overlays = args.overlays ++ extraOverlays; }; if extraOverlays == [ ] then self.__splicedPackages else nixpkgsFun { overlays = args.overlays ++ extraOverlays; }; # NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB # of allocations. DO NOT USE THIS IN NIXPKGS. Loading Loading
pkgs/test/top-level/default.nix +18 −0 Original line number Diff line number Diff line Loading @@ -64,4 +64,22 @@ lib.recurseIntoAttrs { assert lib.all (p: p.stdenv.buildPlatform == p.stdenv.hostPlatform) pkgsLocal; assert lib.all (p: p.stdenv.buildPlatform != p.stdenv.hostPlatform) pkgsCross; pkgs.emptyFile; # appendOverlays must preserve splicing so that cross-compilation # works in NixOS modules (which go through appendOverlays via nixpkgs.nix). appendOverlaysPreservesSplicing = let cross = nixpkgsFun { localSystem = { system = "x86_64-linux"; }; crossSystem = { system = "aarch64-linux"; }; }; appended = cross.appendOverlays [ ]; in assert cross.makeWrapper ? __spliced; assert appended.makeWrapper ? __spliced; pkgs.emptyFile; }
pkgs/top-level/stage.nix +4 −1 Original line number Diff line number Diff line Loading @@ -272,7 +272,10 @@ let # in one go when calling Nixpkgs, for performance and simplicity. appendOverlays = extraOverlays: if extraOverlays == [ ] then self else nixpkgsFun { overlays = args.overlays ++ extraOverlays; }; if extraOverlays == [ ] then self.__splicedPackages else nixpkgsFun { overlays = args.overlays ++ extraOverlays; }; # NOTE: each call to extend causes a full nixpkgs rebuild, adding ~130MB # of allocations. DO NOT USE THIS IN NIXPKGS. Loading