2010-03-09 10:33:31 +00:00
|
|
|
with (import ./release-lib.nix);
|
2010-03-09 14:14:30 +00:00
|
|
|
let
|
|
|
|
nativePlatforms = linux;
|
|
|
|
|
|
|
|
/* Basic list of packages to cross-build */
|
2012-12-28 18:42:10 +00:00
|
|
|
basicCrossDrv = {
|
2010-09-02 20:18:04 +01:00
|
|
|
gccCrossStageFinal = nativePlatforms;
|
2012-12-28 18:08:19 +00:00
|
|
|
bison.crossDrv = nativePlatforms;
|
|
|
|
busybox.crossDrv = nativePlatforms;
|
|
|
|
coreutils.crossDrv = nativePlatforms;
|
|
|
|
dropbear.crossDrv = nativePlatforms;
|
|
|
|
tigervnc.crossDrv = nativePlatforms;
|
|
|
|
wxGTK.crossDrv = nativePlatforms;
|
2010-03-09 14:14:30 +00:00
|
|
|
#firefox = nativePlatforms;
|
|
|
|
xorg = {
|
2012-12-28 18:08:19 +00:00
|
|
|
#xorgserver.crossDrv = nativePlatforms;
|
2010-03-09 14:14:30 +00:00
|
|
|
};
|
2012-12-28 18:08:19 +00:00
|
|
|
nixUnstable.crossDrv = nativePlatforms;
|
|
|
|
linuxPackages_3_4.kernel.crossDrv = linux;
|
2010-03-09 14:14:30 +00:00
|
|
|
};
|
2010-03-09 10:33:31 +00:00
|
|
|
|
2010-03-09 14:14:30 +00:00
|
|
|
/* Basic list of packages to be natively built,
|
|
|
|
but need a crossSystem defined to get meaning */
|
2012-12-28 18:42:10 +00:00
|
|
|
basicNativeDrv = {
|
2010-03-09 14:14:30 +00:00
|
|
|
gdbCross = nativePlatforms;
|
|
|
|
};
|
|
|
|
|
2012-12-28 18:42:10 +00:00
|
|
|
basic = basicCrossDrv // basicNativeDrv;
|
2010-03-09 14:14:30 +00:00
|
|
|
|
|
|
|
in
|
2010-03-09 10:33:31 +00:00
|
|
|
(
|
|
|
|
|
|
|
|
/* Test some cross builds to the Sheevaplug */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
2013-02-15 12:36:34 +00:00
|
|
|
config = "armv5tel-unknown-linux-gnueabi";
|
2010-03-09 10:33:31 +00:00
|
|
|
bigEndian = false;
|
|
|
|
arch = "arm";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
|
|
|
platform = pkgs.platforms.sheevaplug;
|
2010-03-09 15:48:25 +00:00
|
|
|
libc = "glibc";
|
2010-03-09 10:33:31 +00:00
|
|
|
openssl.system = "linux-generic32";
|
|
|
|
};
|
2010-03-09 14:14:30 +00:00
|
|
|
|
2010-03-09 10:33:31 +00:00
|
|
|
in {
|
2010-03-09 14:14:30 +00:00
|
|
|
crossSheevaplugLinux = mapTestOnCross crossSystem (
|
|
|
|
basic //
|
|
|
|
{
|
2012-12-28 18:08:19 +00:00
|
|
|
ubootSheevaplug.crossDrv = nativePlatforms;
|
2010-03-09 14:14:30 +00:00
|
|
|
});
|
2010-03-09 10:33:31 +00:00
|
|
|
}) // (
|
|
|
|
|
2010-03-09 15:48:25 +00:00
|
|
|
/* Test some cross builds to the Sheevaplug - uclibc*/
|
|
|
|
let
|
|
|
|
crossSystem = {
|
2013-02-15 12:36:34 +00:00
|
|
|
config = "armv5tel-unknown-linux-gnueabi";
|
2010-03-09 15:48:25 +00:00
|
|
|
bigEndian = false;
|
|
|
|
arch = "arm";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
|
|
|
platform = pkgs.platforms.sheevaplug;
|
|
|
|
libc = "uclibc";
|
|
|
|
openssl.system = "linux-generic32";
|
2010-09-02 20:18:04 +01:00
|
|
|
uclibc.extraConfig = ''
|
|
|
|
CONFIG_ARM_OABI n
|
|
|
|
CONFIG_ARM_EABI y
|
|
|
|
ARCH_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_LITTLE_ENDIAN y
|
2010-09-03 15:59:04 +01:00
|
|
|
LINUXTHREADS_OLD y
|
2010-09-02 20:18:04 +01:00
|
|
|
'';
|
2010-03-09 15:48:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
crossSheevaplugLinuxUclibc = mapTestOnCross crossSystem (
|
|
|
|
basic //
|
|
|
|
{
|
2012-12-28 18:08:19 +00:00
|
|
|
ubootSheevaplug.crossDrv = nativePlatforms;
|
2010-03-09 15:48:25 +00:00
|
|
|
});
|
|
|
|
}) // (
|
|
|
|
|
2010-03-09 10:33:31 +00:00
|
|
|
/* Test some cross builds to the mipsel */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
2013-02-15 12:36:34 +00:00
|
|
|
config = "mipsel-unknown-linux";
|
2010-03-09 10:33:31 +00:00
|
|
|
bigEndian = false;
|
|
|
|
arch = "mips";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
2010-03-10 20:44:48 +00:00
|
|
|
libc = "uclibc";
|
2010-03-09 10:33:31 +00:00
|
|
|
platform = {
|
|
|
|
name = "malta";
|
2010-03-10 20:44:48 +00:00
|
|
|
kernelMajor = "2.4";
|
2010-09-03 20:25:05 +01:00
|
|
|
kernelBaseConfig = "defconfig-malta";
|
2010-03-10 20:44:48 +00:00
|
|
|
kernelHeadersBaseConfig = "defconfig-malta";
|
2010-03-09 10:33:31 +00:00
|
|
|
uboot = null;
|
|
|
|
kernelArch = "mips";
|
|
|
|
kernelAutoModules = false;
|
2010-03-10 20:44:48 +00:00
|
|
|
kernelTarget = "vmlinux";
|
2010-03-09 10:33:31 +00:00
|
|
|
};
|
|
|
|
openssl.system = "linux-generic32";
|
2010-09-02 22:34:37 +01:00
|
|
|
uclibc.extraConfig = ''
|
|
|
|
ARCH_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_LITTLE_ENDIAN y
|
2010-09-03 15:59:04 +01:00
|
|
|
LINUXTHREADS_OLD y
|
2010-09-03 20:25:05 +01:00
|
|
|
|
|
|
|
# Without this, it does not build for linux 2.4
|
|
|
|
UCLIBC_SUSV4_LEGACY y
|
2010-09-02 22:34:37 +01:00
|
|
|
'';
|
2010-03-09 10:33:31 +00:00
|
|
|
};
|
|
|
|
in {
|
2010-03-10 20:44:48 +00:00
|
|
|
crossMipselLinux24 = mapTestOnCross crossSystem basic;
|
2010-03-09 10:33:31 +00:00
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Test some cross builds to the ultrasparc */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
2013-02-15 12:36:34 +00:00
|
|
|
config = "sparc64-unknown-linux";
|
2010-03-09 10:33:31 +00:00
|
|
|
bigEndian = true;
|
|
|
|
arch = "sparc64";
|
|
|
|
float = "hard";
|
|
|
|
withTLS = true;
|
2010-03-09 15:48:25 +00:00
|
|
|
libc = "glibc";
|
2010-03-09 10:33:31 +00:00
|
|
|
platform = {
|
|
|
|
name = "ultrasparc";
|
2010-03-10 20:44:48 +00:00
|
|
|
kernelMajor = "2.6";
|
2010-03-09 10:33:31 +00:00
|
|
|
kernelHeadersBaseConfig = "sparc64_defconfig";
|
|
|
|
kernelBaseConfig = "sparc64_defconfig";
|
|
|
|
kernelArch = "sparc";
|
|
|
|
kernelAutoModules = false;
|
|
|
|
kernelTarget = "zImage";
|
|
|
|
uboot = null;
|
|
|
|
};
|
|
|
|
openssl.system = "linux64-sparcv9";
|
2010-03-14 14:05:08 +00:00
|
|
|
gcc.cpu = "ultrasparc";
|
2010-03-09 10:33:31 +00:00
|
|
|
};
|
|
|
|
in {
|
2010-03-09 14:14:30 +00:00
|
|
|
crossUltraSparcLinux = mapTestOnCross crossSystem basic;
|
2010-05-06 19:47:35 +01:00
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Test some cross builds on mingw32 */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "i686-pc-mingw32";
|
|
|
|
arch = "x86";
|
|
|
|
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
|
|
|
platform = {};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
crossMingw32 = mapTestOnCross crossSystem {
|
2012-12-28 18:08:19 +00:00
|
|
|
coreutils.crossDrv = nativePlatforms;
|
|
|
|
boehmgc.crossDrv = nativePlatforms;
|
|
|
|
gmp.crossDrv = nativePlatforms;
|
|
|
|
guile_1_8.crossDrv = nativePlatforms;
|
|
|
|
libffi.crossDrv = nativePlatforms;
|
|
|
|
libtool.crossDrv = nativePlatforms;
|
|
|
|
libunistring.crossDrv = nativePlatforms;
|
|
|
|
windows.wxMSW.crossDrv = nativePlatforms;
|
2010-05-06 19:47:35 +01:00
|
|
|
};
|
2010-05-12 16:46:55 +01:00
|
|
|
}) // (
|
|
|
|
|
2012-05-24 23:07:23 +01:00
|
|
|
/* Test some cross builds on mingw-w64 */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
# That's the triplet they use in the mingw-w64 docs,
|
|
|
|
# and it's relevant for nixpkgs conditions.
|
|
|
|
config = "x86_64-w64-mingw32";
|
|
|
|
arch = "x86_64"; # Irrelevant
|
|
|
|
libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain
|
|
|
|
platform = {};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
crossMingwW64 = mapTestOnCross crossSystem {
|
2012-12-28 18:08:19 +00:00
|
|
|
coreutils.crossDrv = nativePlatforms;
|
|
|
|
boehmgc.crossDrv = nativePlatforms;
|
|
|
|
gmp.crossDrv = nativePlatforms;
|
|
|
|
guile_1_8.crossDrv = nativePlatforms;
|
|
|
|
libffi.crossDrv = nativePlatforms;
|
|
|
|
libtool.crossDrv = nativePlatforms;
|
|
|
|
libunistring.crossDrv = nativePlatforms;
|
|
|
|
windows.wxMSW.crossDrv = nativePlatforms;
|
2012-05-24 23:07:23 +01:00
|
|
|
};
|
|
|
|
}) // (
|
|
|
|
|
2010-05-12 16:46:55 +01:00
|
|
|
/* GNU aka. GNU/Hurd. */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "i586-pc-gnu";
|
|
|
|
bigEndian = false;
|
|
|
|
arch = "i586";
|
|
|
|
float = "hard";
|
|
|
|
withTLS = true;
|
|
|
|
platform = pkgs.platforms.pc;
|
|
|
|
libc = "glibc";
|
2010-06-22 14:02:31 +01:00
|
|
|
openssl.system = "hurd-x86"; # Nix depends on OpenSSL.
|
2010-05-12 16:46:55 +01:00
|
|
|
};
|
|
|
|
in {
|
2010-05-21 16:07:54 +01:00
|
|
|
crossGNU = mapTestOnCross crossSystem {
|
2011-11-19 14:27:37 +00:00
|
|
|
gnu.hurdCross = nativePlatforms;
|
2012-12-28 18:08:19 +00:00
|
|
|
gnu.mach.crossDrv = nativePlatforms;
|
2011-11-19 14:27:37 +00:00
|
|
|
gnu.mig = nativePlatforms;
|
2012-12-28 18:08:19 +00:00
|
|
|
gnu.smbfs.crossDrv = nativePlatforms;
|
2010-05-21 16:07:54 +01:00
|
|
|
|
2012-12-28 18:08:19 +00:00
|
|
|
coreutils.crossDrv = nativePlatforms;
|
|
|
|
ed.crossDrv = nativePlatforms;
|
|
|
|
grub2.crossDrv = nativePlatforms;
|
|
|
|
inetutils.crossDrv = nativePlatforms;
|
|
|
|
boehmgc.crossDrv = nativePlatforms;
|
|
|
|
findutils.crossDrv = nativePlatforms;
|
|
|
|
gcc.crossDrv = nativePlatforms;
|
|
|
|
gcc46.crossDrv = nativePlatforms;
|
|
|
|
gdb.crossDrv = nativePlatforms;
|
|
|
|
gmp.crossDrv = nativePlatforms;
|
|
|
|
gnugrep.crossDrv = nativePlatforms;
|
|
|
|
gnumake.crossDrv = nativePlatforms;
|
|
|
|
gnused.crossDrv = nativePlatforms;
|
|
|
|
guile_1_8.crossDrv = nativePlatforms;
|
|
|
|
guile.crossDrv = nativePlatforms;
|
|
|
|
libffi.crossDrv = nativePlatforms;
|
|
|
|
libtool.crossDrv = nativePlatforms;
|
|
|
|
libunistring.crossDrv = nativePlatforms;
|
|
|
|
lsh.crossDrv = nativePlatforms;
|
|
|
|
nixUnstable.crossDrv = nativePlatforms;
|
|
|
|
openssl.crossDrv = nativePlatforms; # dependency of Nix
|
|
|
|
patch.crossDrv = nativePlatforms;
|
|
|
|
samba_light.crossDrv = nativePlatforms; # needed for `runInGenericVM'
|
|
|
|
zile.crossDrv = nativePlatforms;
|
2010-05-21 16:07:54 +01:00
|
|
|
};
|
2010-09-02 19:41:48 +01:00
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Linux on the fuloong */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
2013-02-15 12:36:34 +00:00
|
|
|
config = "mips64el-unknown-linux";
|
2010-09-02 19:41:48 +01:00
|
|
|
bigEndian = false;
|
|
|
|
arch = "mips";
|
|
|
|
float = "hard";
|
|
|
|
withTLS = true;
|
|
|
|
libc = "glibc";
|
|
|
|
platform = {
|
|
|
|
name = "fuloong-minipc";
|
|
|
|
kernelMajor = "2.6";
|
|
|
|
kernelBaseConfig = "lemote2f_defconfig";
|
|
|
|
kernelHeadersBaseConfig = "fuloong2e_defconfig";
|
|
|
|
uboot = null;
|
|
|
|
kernelArch = "mips";
|
|
|
|
kernelAutoModules = false;
|
|
|
|
kernelTarget = "vmlinux";
|
|
|
|
};
|
|
|
|
openssl.system = "linux-generic32";
|
|
|
|
gcc = {
|
|
|
|
arch = "loongson2f";
|
|
|
|
abi = "n32";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
fuloongminipc = mapTestOnCross crossSystem {
|
|
|
|
|
2012-12-28 18:08:19 +00:00
|
|
|
coreutils.crossDrv = nativePlatforms;
|
|
|
|
ed.crossDrv = nativePlatforms;
|
|
|
|
grub2.crossDrv = nativePlatforms;
|
|
|
|
inetutils.crossDrv = nativePlatforms;
|
|
|
|
nixUnstable.crossDrv = nativePlatforms;
|
|
|
|
patch.crossDrv = nativePlatforms;
|
|
|
|
zile.crossDrv = nativePlatforms;
|
2010-09-02 19:41:48 +01:00
|
|
|
};
|
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Linux on the Ben Nanonote */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
2013-02-15 12:36:34 +00:00
|
|
|
config = "mipsel-unknown-linux";
|
2010-09-02 19:41:48 +01:00
|
|
|
bigEndian = false;
|
|
|
|
arch = "mips";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
|
|
|
libc = "glibc";
|
|
|
|
platform = {
|
|
|
|
name = "ben_nanonote";
|
|
|
|
kernelMajor = "2.6";
|
|
|
|
kernelBaseConfig = "qi_lb60_defconfig";
|
|
|
|
kernelHeadersBaseConfig = "malta_defconfig";
|
|
|
|
uboot = "nanonote";
|
|
|
|
kernelArch = "mips";
|
|
|
|
kernelAutoModules = false;
|
|
|
|
kernelTarget = "vmlinux.bin";
|
|
|
|
kernelExtraConfig = ''
|
|
|
|
SOUND y
|
|
|
|
SND y
|
|
|
|
SND_MIPS y
|
|
|
|
SND_SOC y
|
|
|
|
SND_JZ4740_SOC y
|
|
|
|
SND_JZ4740_SOC_QI_LB60 y
|
|
|
|
FUSE_FS m
|
|
|
|
MIPS_FPU_EMU y
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
openssl.system = "linux-generic32";
|
|
|
|
perl.arch = "mipsel-unknown";
|
|
|
|
uclibc.extraConfig = ''
|
|
|
|
CONFIG_MIPS_ISA_1 n
|
|
|
|
CONFIG_MIPS_ISA_MIPS32 y
|
|
|
|
CONFIG_MIPS_N32_ABI n
|
|
|
|
CONFIG_MIPS_O32_ABI y
|
|
|
|
ARCH_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_LITTLE_ENDIAN y
|
|
|
|
LINUXTHREADS_OLD y
|
|
|
|
'';
|
|
|
|
gcc = {
|
|
|
|
abi = "32";
|
|
|
|
arch = "mips32";
|
|
|
|
};
|
|
|
|
mpg123.cpu = "generic_nofpu";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nanonote = mapTestOnCross crossSystem {
|
|
|
|
|
2012-12-28 18:08:19 +00:00
|
|
|
coreutils.crossDrv = nativePlatforms;
|
|
|
|
ed.crossDrv = nativePlatforms;
|
|
|
|
inetutils.crossDrv = nativePlatforms;
|
|
|
|
nixUnstable.crossDrv = nativePlatforms;
|
|
|
|
patch.crossDrv = nativePlatforms;
|
|
|
|
zile.crossDrv = nativePlatforms;
|
|
|
|
prboom.crossDrv = nativePlatforms;
|
|
|
|
vim.crossDrv = nativePlatforms;
|
|
|
|
lynx.crossDrv = nativePlatforms;
|
|
|
|
patchelf.crossDrv = nativePlatforms;
|
|
|
|
nix.crossDrv = nativePlatforms;
|
|
|
|
fossil.crossDrv = nativePlatforms;
|
|
|
|
binutils.crossDrv = nativePlatforms;
|
|
|
|
mpg123.crossDrv = nativePlatforms;
|
|
|
|
yacas.crossDrv = nativePlatforms;
|
2010-09-02 19:41:48 +01:00
|
|
|
};
|
2010-03-09 10:33:31 +00:00
|
|
|
})
|