nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1# These can be passed to nixpkgs as either the `localSystem` or
2# `crossSystem`. They are put here for user convenience, but also used by cross
3# tests and linux cross stdenv building, so handle with care!
4{ lib }:
5let
6 platforms = import ./platforms.nix { inherit lib; };
7
8 riscv = bits: {
9 config = "riscv${bits}-unknown-linux-gnu";
10 platform = platforms.riscv-multiplatform bits;
11 };
12in
13
14rec {
15 #
16 # Linux
17 #
18 powernv = {
19 config = "powerpc64le-unknown-linux-gnu";
20 platform = platforms.powernv;
21 };
22 musl-power = {
23 config = "powerpc64le-unknown-linux-musl";
24 platform = platforms.powernv;
25 };
26
27 sheevaplug = {
28 config = "armv5tel-unknown-linux-gnueabi";
29 platform = platforms.sheevaplug;
30 };
31
32 raspberryPi = {
33 config = "armv6l-unknown-linux-gnueabihf";
34 platform = platforms.raspberrypi;
35 };
36
37 armv7l-hf-multiplatform = {
38 config = "armv7l-unknown-linux-gnueabihf";
39 platform = platforms.armv7l-hf-multiplatform;
40 };
41
42 aarch64-multiplatform = {
43 config = "aarch64-unknown-linux-gnu";
44 platform = platforms.aarch64-multiplatform;
45 };
46
47 armv7a-android-prebuilt = {
48 config = "armv7a-unknown-linux-androideabi";
49 sdkVer = "29";
50 ndkVer = "18b";
51 platform = platforms.armv7a-android;
52 useAndroidPrebuilt = true;
53 };
54
55 aarch64-android-prebuilt = {
56 config = "aarch64-unknown-linux-android";
57 sdkVer = "29";
58 ndkVer = "18b";
59 platform = platforms.aarch64-multiplatform;
60 useAndroidPrebuilt = true;
61 };
62
63 scaleway-c1 = armv7l-hf-multiplatform // rec {
64 platform = platforms.scaleway-c1;
65 inherit (platform.gcc) fpu;
66 };
67
68 pogoplug4 = {
69 config = "armv5tel-unknown-linux-gnueabi";
70 platform = platforms.pogoplug4;
71 };
72
73 ben-nanonote = {
74 config = "mipsel-unknown-linux-uclibc";
75 platform = platforms.ben_nanonote;
76 };
77
78 fuloongminipc = {
79 config = "mipsel-unknown-linux-gnu";
80 platform = platforms.fuloong2f_n32;
81 };
82
83 muslpi = raspberryPi // {
84 config = "armv6l-unknown-linux-musleabihf";
85 };
86
87 aarch64-multiplatform-musl = aarch64-multiplatform // {
88 config = "aarch64-unknown-linux-musl";
89 };
90
91 gnu64 = { config = "x86_64-unknown-linux-gnu"; };
92 gnu32 = { config = "i686-unknown-linux-gnu"; };
93
94 musl64 = { config = "x86_64-unknown-linux-musl"; };
95 musl32 = { config = "i686-unknown-linux-musl"; };
96
97 riscv64 = riscv "64";
98 riscv32 = riscv "32";
99
100 riscv64-embedded = {
101 config = "riscv64-none-elf";
102 libc = "newlib";
103 platform = platforms.riscv-multiplatform "64";
104 };
105
106 riscv32-embedded = {
107 config = "riscv32-none-elf";
108 libc = "newlib";
109 platform = platforms.riscv-multiplatform "32";
110 };
111
112 msp430 = {
113 config = "msp430-elf";
114 libc = "newlib";
115 };
116
117 avr = {
118 config = "avr";
119 };
120
121 vc4 = {
122 config = "vc4-elf";
123 libc = "newlib";
124 platform = {};
125 };
126
127 arm-embedded = {
128 config = "arm-none-eabi";
129 libc = "newlib";
130 };
131 armhf-embedded = {
132 config = "arm-none-eabihf";
133 libc = "newlib";
134 };
135
136 aarch64-embedded = {
137 config = "aarch64-none-elf";
138 libc = "newlib";
139 };
140
141 aarch64be-embedded = {
142 config = "aarch64_be-none-elf";
143 libc = "newlib";
144 };
145
146 ppc-embedded = {
147 config = "powerpc-none-eabi";
148 libc = "newlib";
149 };
150
151 ppcle-embedded = {
152 config = "powerpcle-none-eabi";
153 libc = "newlib";
154 };
155
156 i686-embedded = {
157 config = "i686-elf";
158 libc = "newlib";
159 };
160
161 x86_64-embedded = {
162 config = "x86_64-elf";
163 libc = "newlib";
164 };
165
166 #
167 # Redox
168 #
169
170 x86_64-unknown-redox = {
171 config = "x86_64-unknown-redox";
172 libc = "relibc";
173 };
174
175 #
176 # Darwin
177 #
178
179 iphone64 = {
180 config = "aarch64-apple-ios";
181 # config = "aarch64-apple-darwin14";
182 sdkVer = "12.4";
183 xcodeVer = "10.3";
184 xcodePlatform = "iPhoneOS";
185 useiOSPrebuilt = true;
186 platform = {};
187 };
188
189 iphone32 = {
190 config = "armv7a-apple-ios";
191 # config = "arm-apple-darwin10";
192 sdkVer = "12.4";
193 xcodeVer = "10.3";
194 xcodePlatform = "iPhoneOS";
195 useiOSPrebuilt = true;
196 platform = {};
197 };
198
199 iphone64-simulator = {
200 config = "x86_64-apple-ios";
201 # config = "x86_64-apple-darwin14";
202 sdkVer = "12.4";
203 xcodeVer = "10.3";
204 xcodePlatform = "iPhoneSimulator";
205 useiOSPrebuilt = true;
206 platform = {};
207 };
208
209 iphone32-simulator = {
210 config = "i686-apple-ios";
211 # config = "i386-apple-darwin11";
212 sdkVer = "12.4";
213 xcodeVer = "10.3";
214 xcodePlatform = "iPhoneSimulator";
215 useiOSPrebuilt = true;
216 platform = {};
217 };
218
219 #
220 # Windows
221 #
222
223 # 32 bit mingw-w64
224 mingw32 = {
225 config = "i686-w64-mingw32";
226 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
227 platform = {};
228 };
229
230 # 64 bit mingw-w64
231 mingwW64 = {
232 # That's the triplet they use in the mingw-w64 docs.
233 config = "x86_64-w64-mingw32";
234 libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
235 platform = {};
236 };
237
238 # BSDs
239
240 amd64-netbsd = {
241 config = "x86_64-unknown-netbsd";
242 libc = "nblibc";
243 };
244
245 #
246 # WASM
247 #
248
249 wasi32 = {
250 config = "wasm32-unknown-wasi";
251 useLLVM = true;
252 };
253
254 # Ghcjs
255 ghcjs = {
256 config = "js-unknown-ghcjs";
257 platform = {};
258 };
259}