PageRenderTime 56ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 1ms

/pkgs/top-level/release-cross.nix

https://github.com/dagss/nixpkgs
Nix | 305 lines | 276 code | 18 blank | 11 comment | 1 complexity | 19d16651a6255531cf3053b162a0c834 MD5 | raw file
  1. with (import ./release-lib.nix);
  2. let
  3. nativePlatforms = linux;
  4. /* Basic list of packages to cross-build */
  5. basicHostDrv = {
  6. gccCrossStageFinal = nativePlatforms;
  7. bison.hostDrv = nativePlatforms;
  8. busybox.hostDrv = nativePlatforms;
  9. coreutils.hostDrv = nativePlatforms;
  10. dropbear.hostDrv = nativePlatforms;
  11. tigervnc.hostDrv = nativePlatforms;
  12. #openoffice.hostDrv = nativePlatforms;
  13. wxGTK.hostDrv = nativePlatforms;
  14. #firefox = nativePlatforms;
  15. xorg = {
  16. #xorgserver.hostDrv = nativePlatforms;
  17. };
  18. nixUnstable.hostDrv = nativePlatforms;
  19. linuxPackages_2_6_32.kernel.hostDrv = linux;
  20. linuxPackages_2_6_33.kernel.hostDrv = linux;
  21. linuxPackages_2_6_34.kernel.hostDrv = linux;
  22. linuxPackages_2_6_35.kernel.hostDrv = linux;
  23. };
  24. /* Basic list of packages to be natively built,
  25. but need a crossSystem defined to get meaning */
  26. basicBuildDrv = {
  27. gdbCross = nativePlatforms;
  28. };
  29. basic = basicHostDrv // basicBuildDrv;
  30. in
  31. (
  32. /* Test some cross builds to the Sheevaplug */
  33. let
  34. crossSystem = {
  35. config = "armv5tel-unknown-linux-gnueabi";
  36. bigEndian = false;
  37. arch = "arm";
  38. float = "soft";
  39. withTLS = true;
  40. platform = pkgs.platforms.sheevaplug;
  41. libc = "glibc";
  42. openssl.system = "linux-generic32";
  43. };
  44. in {
  45. crossSheevaplugLinux = mapTestOnCross crossSystem (
  46. basic //
  47. {
  48. ubootSheevaplug.hostDrv = nativePlatforms;
  49. });
  50. }) // (
  51. /* Test some cross builds to the Sheevaplug - uclibc*/
  52. let
  53. crossSystem = {
  54. config = "armv5tel-unknown-linux-gnueabi";
  55. bigEndian = false;
  56. arch = "arm";
  57. float = "soft";
  58. withTLS = true;
  59. platform = pkgs.platforms.sheevaplug;
  60. libc = "uclibc";
  61. openssl.system = "linux-generic32";
  62. uclibc.extraConfig = ''
  63. CONFIG_ARM_OABI n
  64. CONFIG_ARM_EABI y
  65. ARCH_BIG_ENDIAN n
  66. ARCH_WANTS_BIG_ENDIAN n
  67. ARCH_WANTS_LITTLE_ENDIAN y
  68. LINUXTHREADS_OLD y
  69. '';
  70. };
  71. in {
  72. crossSheevaplugLinuxUclibc = mapTestOnCross crossSystem (
  73. basic //
  74. {
  75. ubootSheevaplug.hostDrv = nativePlatforms;
  76. });
  77. }) // (
  78. /* Test some cross builds to the mipsel */
  79. let
  80. crossSystem = {
  81. config = "mipsel-unknown-linux";
  82. bigEndian = false;
  83. arch = "mips";
  84. float = "soft";
  85. withTLS = true;
  86. libc = "uclibc";
  87. platform = {
  88. name = "malta";
  89. kernelMajor = "2.4";
  90. kernelBaseConfig = "defconfig-malta";
  91. kernelHeadersBaseConfig = "defconfig-malta";
  92. uboot = null;
  93. kernelArch = "mips";
  94. kernelAutoModules = false;
  95. kernelTarget = "vmlinux";
  96. };
  97. openssl.system = "linux-generic32";
  98. uclibc.extraConfig = ''
  99. ARCH_BIG_ENDIAN n
  100. ARCH_WANTS_BIG_ENDIAN n
  101. ARCH_WANTS_LITTLE_ENDIAN y
  102. LINUXTHREADS_OLD y
  103. # Without this, it does not build for linux 2.4
  104. UCLIBC_SUSV4_LEGACY y
  105. '';
  106. };
  107. in {
  108. crossMipselLinux24 = mapTestOnCross crossSystem basic;
  109. }) // (
  110. /* Test some cross builds to the ultrasparc */
  111. let
  112. crossSystem = {
  113. config = "sparc64-unknown-linux";
  114. bigEndian = true;
  115. arch = "sparc64";
  116. float = "hard";
  117. withTLS = true;
  118. libc = "glibc";
  119. platform = {
  120. name = "ultrasparc";
  121. kernelMajor = "2.6";
  122. kernelHeadersBaseConfig = "sparc64_defconfig";
  123. kernelBaseConfig = "sparc64_defconfig";
  124. kernelArch = "sparc";
  125. kernelAutoModules = false;
  126. kernelTarget = "zImage";
  127. uboot = null;
  128. };
  129. openssl.system = "linux64-sparcv9";
  130. gcc.cpu = "ultrasparc";
  131. };
  132. in {
  133. crossUltraSparcLinux = mapTestOnCross crossSystem basic;
  134. }) // (
  135. /* Test some cross builds on mingw32 */
  136. let
  137. crossSystem = {
  138. config = "i686-pc-mingw32";
  139. arch = "x86";
  140. libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
  141. platform = {};
  142. };
  143. in {
  144. crossMingw32 = mapTestOnCross crossSystem {
  145. coreutils.hostDrv = nativePlatforms;
  146. boehmgc.hostDrv = nativePlatforms;
  147. gmp.hostDrv = nativePlatforms;
  148. guile_1_8.hostDrv = nativePlatforms;
  149. libffi.hostDrv = nativePlatforms;
  150. libtool.hostDrv = nativePlatforms;
  151. libunistring.hostDrv = nativePlatforms;
  152. windows.wxMSW.hostDrv = nativePlatforms;
  153. };
  154. }) // (
  155. /* GNU aka. GNU/Hurd. */
  156. let
  157. crossSystem = {
  158. config = "i586-pc-gnu";
  159. bigEndian = false;
  160. arch = "i586";
  161. float = "hard";
  162. withTLS = true;
  163. platform = pkgs.platforms.pc;
  164. libc = "glibc";
  165. openssl.system = "hurd-x86"; # Nix depends on OpenSSL.
  166. };
  167. in {
  168. crossGNU = mapTestOnCross crossSystem {
  169. hurdCross = nativePlatforms;
  170. mach.hostDrv = nativePlatforms;
  171. coreutils.hostDrv = nativePlatforms;
  172. ed.hostDrv = nativePlatforms;
  173. grub2.hostDrv = nativePlatforms;
  174. inetutils.hostDrv = nativePlatforms;
  175. boehmgc.hostDrv = nativePlatforms;
  176. gmp.hostDrv = nativePlatforms;
  177. guile_1_8.hostDrv = nativePlatforms;
  178. libffi.hostDrv = nativePlatforms;
  179. libtool.hostDrv = nativePlatforms;
  180. libunistring.hostDrv = nativePlatforms;
  181. nixUnstable.hostDrv = nativePlatforms;
  182. patch.hostDrv = nativePlatforms;
  183. zile.hostDrv = nativePlatforms;
  184. };
  185. }) // (
  186. /* Linux on the fuloong */
  187. let
  188. crossSystem = {
  189. config = "mips64el-unknown-linux";
  190. bigEndian = false;
  191. arch = "mips";
  192. float = "hard";
  193. withTLS = true;
  194. libc = "glibc";
  195. platform = {
  196. name = "fuloong-minipc";
  197. kernelMajor = "2.6";
  198. kernelBaseConfig = "lemote2f_defconfig";
  199. kernelHeadersBaseConfig = "fuloong2e_defconfig";
  200. uboot = null;
  201. kernelArch = "mips";
  202. kernelAutoModules = false;
  203. kernelTarget = "vmlinux";
  204. };
  205. openssl.system = "linux-generic32";
  206. gcc = {
  207. arch = "loongson2f";
  208. abi = "n32";
  209. };
  210. };
  211. in {
  212. fuloongminipc = mapTestOnCross crossSystem {
  213. coreutils.hostDrv = nativePlatforms;
  214. ed.hostDrv = nativePlatforms;
  215. grub2.hostDrv = nativePlatforms;
  216. inetutils.hostDrv = nativePlatforms;
  217. nixUnstable.hostDrv = nativePlatforms;
  218. patch.hostDrv = nativePlatforms;
  219. zile.hostDrv = nativePlatforms;
  220. };
  221. }) // (
  222. /* Linux on the Ben Nanonote */
  223. let
  224. crossSystem = {
  225. config = "mipsel-unknown-linux";
  226. bigEndian = false;
  227. arch = "mips";
  228. float = "soft";
  229. withTLS = true;
  230. libc = "glibc";
  231. platform = {
  232. name = "ben_nanonote";
  233. kernelMajor = "2.6";
  234. kernelBaseConfig = "qi_lb60_defconfig";
  235. kernelHeadersBaseConfig = "malta_defconfig";
  236. uboot = "nanonote";
  237. kernelArch = "mips";
  238. kernelAutoModules = false;
  239. kernelTarget = "vmlinux.bin";
  240. kernelExtraConfig = ''
  241. SOUND y
  242. SND y
  243. SND_MIPS y
  244. SND_SOC y
  245. SND_JZ4740_SOC y
  246. SND_JZ4740_SOC_QI_LB60 y
  247. FUSE_FS m
  248. MIPS_FPU_EMU y
  249. '';
  250. };
  251. openssl.system = "linux-generic32";
  252. perl.arch = "mipsel-unknown";
  253. uclibc.extraConfig = ''
  254. CONFIG_MIPS_ISA_1 n
  255. CONFIG_MIPS_ISA_MIPS32 y
  256. CONFIG_MIPS_N32_ABI n
  257. CONFIG_MIPS_O32_ABI y
  258. ARCH_BIG_ENDIAN n
  259. ARCH_WANTS_BIG_ENDIAN n
  260. ARCH_WANTS_LITTLE_ENDIAN y
  261. LINUXTHREADS_OLD y
  262. '';
  263. gcc = {
  264. abi = "32";
  265. arch = "mips32";
  266. };
  267. mpg123.cpu = "generic_nofpu";
  268. };
  269. in {
  270. nanonote = mapTestOnCross crossSystem {
  271. coreutils.hostDrv = nativePlatforms;
  272. ed.hostDrv = nativePlatforms;
  273. inetutils.hostDrv = nativePlatforms;
  274. nixUnstable.hostDrv = nativePlatforms;
  275. patch.hostDrv = nativePlatforms;
  276. zile.hostDrv = nativePlatforms;
  277. prboom.hostDrv = nativePlatforms;
  278. vim.hostDrv = nativePlatforms;
  279. lynx.hostDrv = nativePlatforms;
  280. patchelf.hostDrv = nativePlatforms;
  281. nix.hostDrv = nativePlatforms;
  282. fossil.hostDrv = nativePlatforms;
  283. binutils.hostDrv = nativePlatforms;
  284. mpg123.hostDrv = nativePlatforms;
  285. yacas.hostDrv = nativePlatforms;
  286. };
  287. })