lol
1lib: self: super: pkgs:
2
3### Deprecated aliases - for backward compatibility
4
5### Please maintain this list in ASCIIbetical ordering.
6### Hint: the "sections" are delimited by ### <letter> ###
7
8# These aliases should not be used within nixpkgs, but exist to improve
9# backward compatibility in projects outside of nixpkgs. See the
10# documentation for the `allowAliases` option for more background.
11
12# A script to convert old aliases to throws and remove old
13# throws can be found in './maintainers/scripts/remove-old-aliases.py'.
14
15# Add 'preserve, reason: reason why' after the date if the alias should not be removed.
16# Try to keep them to a minimum.
17# valid examples of what to preserve:
18# distro aliases such as:
19# debian-package-name -> nixos-package-name
20
21# pkgs is provided to allow packages to be moved out of the darwin attrset.
22
23with self;
24
25let
26 # Removing recurseForDerivation prevents derivations of aliased attribute set
27 # to appear while listing all the packages available.
28 removeRecurseForDerivations =
29 alias:
30 if alias.recurseForDerivations or false then
31 lib.removeAttrs alias [ "recurseForDerivations" ]
32 else
33 alias;
34
35 # Disabling distribution prevents top-level aliases for non-recursed package
36 # sets from building on Hydra.
37 removeDistribute = alias: if lib.isDerivation alias then lib.dontDistribute alias else alias;
38
39 # Make sure that we are not shadowing something from darwin-packages.nix.
40 checkInPkgs =
41 n: alias:
42 if builtins.hasAttr n super then throw "Alias ${n} is still in darwin-packages.nix" else alias;
43
44 mapAliases = lib.mapAttrs (
45 n: alias: removeDistribute (removeRecurseForDerivations (checkInPkgs n alias))
46 );
47
48 # Old Darwin pattern stubs; remove these by 25.11.
49
50 mkStub = pkgs.callPackage ../os-specific/darwin/apple-sdk/mk-stub.nix { };
51
52 warnStub =
53 prefix:
54 lib.warn "${prefix} these stubs do nothing and will be removed in Nixpkgs 25.11; see <https://nixos.org/manual/nixpkgs/stable/#sec-darwin> for documentation and migration instructions";
55
56 apple_sdk_11_0 = warnStub "darwin.apple_sdk_11_0.*:" (
57 pkgs.callPackage ../os-specific/darwin/apple-sdk-11.0 { }
58 );
59
60 apple_sdk_12_3 =
61 warnStub
62 "darwin.apple_sdk_12_3.*: add `apple-sdk_12` to build inputs instead to use the macOS 12 SDK."
63 (pkgs.callPackage ../os-specific/darwin/apple-sdk-12.3 { });
64
65 apple_sdk = apple_sdk_11_0;
66
67 stubs =
68 {
69 inherit apple_sdk apple_sdk_11_0 apple_sdk_12_3;
70 }
71 // lib.genAttrs [
72 "CF"
73 "CarbonHeaders"
74 "CommonCrypto"
75 "CoreSymbolication"
76 "IOKit"
77 "Libc"
78 "Libinfo"
79 "Libm"
80 "Libnotify"
81 "Librpcsvc"
82 "Libsystem"
83 "LibsystemCross"
84 "Security"
85 "architecture"
86 "cf-private"
87 "configd"
88 "configdHeaders"
89 "darwin-stubs"
90 "dtrace"
91 "eap8021x"
92 "hfs"
93 "hfsHeaders"
94 "launchd"
95 "libclosure"
96 "libdispatch"
97 "libmalloc"
98 "libobjc"
99 "libplatform"
100 "libpthread"
101 "mDNSResponder"
102 "objc4"
103 "ppp"
104 "xnu"
105 ] (name: warnStub "darwin.${name}:" (mkStub "11.0" name));
106in
107
108stubs
109// mapAliases ({
110 ### A ###
111
112 apple_sdk_10_12 = throw "darwin.apple_sdk_10_12 was removed as Nixpkgs no longer supports macOS 10.12; see the 25.05 release notes"; # Added 2024-10-27
113
114 ### B ###
115
116 builder = throw "'darwin.builder' has been changed and renamed to 'darwin.linux-builder'. The default ssh port is now 31022. Please update your configuration or override the port back to 22. See https://nixos.org/manual/nixpkgs/unstable/#sec-darwin-builder"; # added 2023-07-06
117 bsdmake = pkgs.bmake; # added 2024-10-03
118
119 ### C ###
120
121 cctools = pkgs.cctools; # added 2024-07-17
122 cctools-apple = pkgs.cctools; # added 2024-07-01
123 cctools-llvm = pkgs.cctools; # added 2024-07-01
124 cctools-port = pkgs.cctools; # added 2024-07-17
125
126 ### D ###
127
128 discrete-scroll = pkgs.discrete-scroll; # added 2024-11-27
129
130 ### I ###
131
132 insert_dylib = throw "'darwin.insert_dylib' has been renamed to 'insert-dylib'"; # added 2024-04-04
133 ios-deploy = throw "'darwin.ios-deploy' has been renamed to 'ios-deploy'"; # added 2024-11-28
134 iproute2mac = lib.warnOnInstantiate "darwin.iproute2mac has been renamed to iproute2mac" pkgs.iproute2mac; # added 2024-12-08
135
136 ### L ###
137
138 libauto = throw "'darwin.libauto' has been removed, as it was broken and unmaintained"; # added 2024-05-10
139 libresolvHeaders = lib.warn "darwin.libresolvHeaders: use `lib.getInclude darwin.libresolv`; this will be removed in 25.11" (
140 lib.getDev self.libresolv
141 ); # added 2025-04-20
142 libtapi = pkgs.libtapi; # 2024-08-16
143 libutilHeaders = lib.warn "darwin.libutilHeaders: use `lib.getInclude darwin.libutil`; this will be removed in 25.11" (
144 lib.getDev self.libutil
145 ); # added 2025-04-20
146
147 ### M ###
148
149 moltenvk = pkgs.moltenvk; # 2024-10-06
150
151 ### O ###
152
153 opencflite = pkgs.opencflite; # added 2024-05-02
154
155 ### P ###
156 postLinkSignHook = throw "'darwin.postLinkSignHook' has been removed because it is obsolete"; # added 2025-02-23
157 print-reexports = throw "'darwin.print-reexports' has been removed as it was unused"; # added 2025-04-20
158
159 ### R ###
160
161 rewrite-tbd = throw "'darwin.rewrite-tbd' has been removed, as it was unused and replaced by `llvm-readtapi(1)`"; # added 2025-04-20
162
163 ### S ###
164
165 stdenvNoCF =
166 lib.warn "darwin.stdenvNoCF: use `stdenv` or `stdenvNoCC`; this will be removed in 25.11"
167 (
168 pkgs.stdenv.override {
169 extraBuildInputs = [ ];
170 }
171 ); # added 2025-04-20
172 stubs = throw "'darwin.stubs.*' have been removed as they were unused"; # added 2025-04-20
173 swift-corelibs-foundation = throw "'darwin.swift-corelibs-foundation' has been removed, as it was broken and is no longer used"; # added 2025-04-20
174})