|
18 | 18 | or dot-files. |
19 | 19 | */ |
20 | 20 |
|
21 | | -let |
22 | | - # We hoist this above the closure so that the same thunk is shared |
23 | | - # between multiple imports of Nixpkgs. This ensures that commands |
24 | | - # like `nix eval nixpkgs#legacyPackages.x86_64-darwin.pkgsStatic.hello` |
25 | | - # print only one warning, which would otherwise be spammy in common |
26 | | - # scenarios that instantiate many copies of Nixpkgs. |
27 | | - # |
28 | | - # Unfortunately, flakes’ handling of transitive dependencies mean |
29 | | - # that it’s still likely users will see multiple warnings, but |
30 | | - # there’s nothing we can do about that within the constraints of the |
31 | | - # Nix language. |
32 | | - x86_64DarwinDeprecationWarning = |
33 | | - pristineLib.warn |
34 | | - "Nixpkgs 26.05 will be the last release to support x86_64-darwin; see https://nixos.org/manual/nixpkgs/unstable/release-notes#x86_64-darwin-26.05" |
35 | | - (x: x); |
36 | | - |
37 | | - pristineLib = import ../../lib; |
38 | | -in |
39 | | - |
40 | 21 | { |
41 | 22 | # The system packages will be built on. See the manual for the |
42 | 23 | # subtle division of labor between these two `*System`s and the three |
@@ -74,6 +55,8 @@ let # Rename the function arguments |
74 | 55 |
|
75 | 56 | in |
76 | 57 | let |
| 58 | + pristineLib = import ../../lib; |
| 59 | + |
77 | 60 | lib = |
78 | 61 | if __allowFileset then |
79 | 62 | pristineLib |
|
99 | 82 | (throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list.") |
100 | 83 | (throwIfNot (lib.all lib.isFunction overlays) "All overlays passed to nixpkgs must be functions.") |
101 | 84 | (throwIfNot (lib.isList crossOverlays) "The crossOverlays argument to nixpkgs must be a list.") |
102 | | - (throwIfNot (lib.all lib.isFunction crossOverlays) "All crossOverlays passed to nixpkgs must be functions.") |
103 | 85 | ( |
104 | | - if |
105 | | - ( |
106 | | - ((localSystem.isDarwin && localSystem.isx86) || (crossSystem.isDarwin && crossSystem.isx86)) |
107 | | - && config.allowDeprecatedx86_64Darwin == false |
108 | | - ) |
109 | | - then |
110 | | - x86_64DarwinDeprecationWarning |
111 | | - else |
112 | | - x: x |
| 86 | + throwIfNot (lib.all lib.isFunction crossOverlays) "All crossOverlays passed to nixpkgs must be functions." |
113 | 87 | ); |
114 | 88 |
|
115 | 89 | localSystem = lib.systems.elaborate args.localSystem; |
|
0 commit comments