2010-03-09 11:33:31 +01:00
|
|
|
with (import ./release-lib.nix);
|
2010-03-09 15:14:30 +01:00
|
|
|
let
|
|
|
|
nativePlatforms = linux;
|
|
|
|
|
|
|
|
/* Basic list of packages to cross-build */
|
|
|
|
basicHostDrv = {
|
2010-09-02 21:18:04 +02:00
|
|
|
gccCrossStageFinal = nativePlatforms;
|
2010-03-09 15:14:30 +01:00
|
|
|
bison.hostDrv = nativePlatforms;
|
2010-03-09 23:44:45 +01:00
|
|
|
busybox.hostDrv = nativePlatforms;
|
2010-09-02 21:18:04 +02:00
|
|
|
coreutils.hostDrv = nativePlatforms;
|
2010-03-10 00:11:12 +01:00
|
|
|
dropbear.hostDrv = nativePlatforms;
|
2010-09-02 22:40:33 +02:00
|
|
|
tigervnc.hostDrv = nativePlatforms;
|
2010-03-09 15:14:30 +01:00
|
|
|
#openoffice.hostDrv = nativePlatforms;
|
|
|
|
wxGTK.hostDrv = nativePlatforms;
|
|
|
|
#firefox = nativePlatforms;
|
|
|
|
xorg = {
|
|
|
|
#xorgserver.hostDrv = nativePlatforms;
|
|
|
|
};
|
|
|
|
nixUnstable.hostDrv = nativePlatforms;
|
2012-05-24 20:59:13 +02:00
|
|
|
linuxPackages_2_6_39.kernel.hostDrv = linux;
|
|
|
|
linuxPackages_3_3.kernel.hostDrv = linux;
|
|
|
|
linuxPackages_3_4.kernel.hostDrv = linux;
|
2010-03-09 15:14:30 +01:00
|
|
|
};
|
2010-03-09 11:33:31 +01:00
|
|
|
|
2010-03-09 15:14:30 +01:00
|
|
|
/* Basic list of packages to be natively built,
|
|
|
|
but need a crossSystem defined to get meaning */
|
|
|
|
basicBuildDrv = {
|
|
|
|
gdbCross = nativePlatforms;
|
|
|
|
};
|
|
|
|
|
|
|
|
basic = basicHostDrv // basicBuildDrv;
|
|
|
|
|
|
|
|
in
|
2010-03-09 11:33:31 +01:00
|
|
|
(
|
|
|
|
|
|
|
|
/* Test some cross builds to the Sheevaplug */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "armv5tel-unknown-linux-gnueabi";
|
|
|
|
bigEndian = false;
|
|
|
|
arch = "arm";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
|
|
|
platform = pkgs.platforms.sheevaplug;
|
2010-03-09 16:48:25 +01:00
|
|
|
libc = "glibc";
|
2010-03-09 11:33:31 +01:00
|
|
|
openssl.system = "linux-generic32";
|
|
|
|
};
|
2010-03-09 15:14:30 +01:00
|
|
|
|
2010-03-09 11:33:31 +01:00
|
|
|
in {
|
2010-03-09 15:14:30 +01:00
|
|
|
crossSheevaplugLinux = mapTestOnCross crossSystem (
|
|
|
|
basic //
|
|
|
|
{
|
|
|
|
ubootSheevaplug.hostDrv = nativePlatforms;
|
|
|
|
});
|
2010-03-09 11:33:31 +01:00
|
|
|
}) // (
|
|
|
|
|
2010-03-09 16:48:25 +01:00
|
|
|
/* Test some cross builds to the Sheevaplug - uclibc*/
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "armv5tel-unknown-linux-gnueabi";
|
|
|
|
bigEndian = false;
|
|
|
|
arch = "arm";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
|
|
|
platform = pkgs.platforms.sheevaplug;
|
|
|
|
libc = "uclibc";
|
|
|
|
openssl.system = "linux-generic32";
|
2010-09-02 21:18:04 +02: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 16:59:04 +02:00
|
|
|
LINUXTHREADS_OLD y
|
2010-09-02 21:18:04 +02:00
|
|
|
'';
|
2010-03-09 16:48:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
crossSheevaplugLinuxUclibc = mapTestOnCross crossSystem (
|
|
|
|
basic //
|
|
|
|
{
|
|
|
|
ubootSheevaplug.hostDrv = nativePlatforms;
|
|
|
|
});
|
|
|
|
}) // (
|
|
|
|
|
2010-03-09 11:33:31 +01:00
|
|
|
/* Test some cross builds to the mipsel */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "mipsel-unknown-linux";
|
|
|
|
bigEndian = false;
|
|
|
|
arch = "mips";
|
|
|
|
float = "soft";
|
|
|
|
withTLS = true;
|
2010-03-10 21:44:48 +01:00
|
|
|
libc = "uclibc";
|
2010-03-09 11:33:31 +01:00
|
|
|
platform = {
|
|
|
|
name = "malta";
|
2010-03-10 21:44:48 +01:00
|
|
|
kernelMajor = "2.4";
|
2010-09-03 21:25:05 +02:00
|
|
|
kernelBaseConfig = "defconfig-malta";
|
2010-03-10 21:44:48 +01:00
|
|
|
kernelHeadersBaseConfig = "defconfig-malta";
|
2010-03-09 11:33:31 +01:00
|
|
|
uboot = null;
|
|
|
|
kernelArch = "mips";
|
|
|
|
kernelAutoModules = false;
|
2010-03-10 21:44:48 +01:00
|
|
|
kernelTarget = "vmlinux";
|
2010-03-09 11:33:31 +01:00
|
|
|
};
|
|
|
|
openssl.system = "linux-generic32";
|
2010-09-02 23:34:37 +02:00
|
|
|
uclibc.extraConfig = ''
|
|
|
|
ARCH_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_BIG_ENDIAN n
|
|
|
|
ARCH_WANTS_LITTLE_ENDIAN y
|
2010-09-03 16:59:04 +02:00
|
|
|
LINUXTHREADS_OLD y
|
2010-09-03 21:25:05 +02:00
|
|
|
|
|
|
|
# Without this, it does not build for linux 2.4
|
|
|
|
UCLIBC_SUSV4_LEGACY y
|
2010-09-02 23:34:37 +02:00
|
|
|
'';
|
2010-03-09 11:33:31 +01:00
|
|
|
};
|
|
|
|
in {
|
2010-03-10 21:44:48 +01:00
|
|
|
crossMipselLinux24 = mapTestOnCross crossSystem basic;
|
2010-03-09 11:33:31 +01:00
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Test some cross builds to the ultrasparc */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "sparc64-unknown-linux";
|
|
|
|
bigEndian = true;
|
|
|
|
arch = "sparc64";
|
|
|
|
float = "hard";
|
|
|
|
withTLS = true;
|
2010-03-09 16:48:25 +01:00
|
|
|
libc = "glibc";
|
2010-03-09 11:33:31 +01:00
|
|
|
platform = {
|
|
|
|
name = "ultrasparc";
|
2010-03-10 21:44:48 +01:00
|
|
|
kernelMajor = "2.6";
|
2010-03-09 11:33:31 +01:00
|
|
|
kernelHeadersBaseConfig = "sparc64_defconfig";
|
|
|
|
kernelBaseConfig = "sparc64_defconfig";
|
|
|
|
kernelArch = "sparc";
|
|
|
|
kernelAutoModules = false;
|
|
|
|
kernelTarget = "zImage";
|
|
|
|
uboot = null;
|
|
|
|
};
|
|
|
|
openssl.system = "linux64-sparcv9";
|
2010-03-14 15:05:08 +01:00
|
|
|
gcc.cpu = "ultrasparc";
|
2010-03-09 11:33:31 +01:00
|
|
|
};
|
|
|
|
in {
|
2010-03-09 15:14:30 +01:00
|
|
|
crossUltraSparcLinux = mapTestOnCross crossSystem basic;
|
2010-05-06 20:47:35 +02: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 {
|
2011-02-15 14:14:33 +01:00
|
|
|
coreutils.hostDrv = nativePlatforms;
|
|
|
|
boehmgc.hostDrv = nativePlatforms;
|
|
|
|
gmp.hostDrv = nativePlatforms;
|
|
|
|
guile_1_8.hostDrv = nativePlatforms;
|
|
|
|
libffi.hostDrv = nativePlatforms;
|
|
|
|
libtool.hostDrv = nativePlatforms;
|
|
|
|
libunistring.hostDrv = nativePlatforms;
|
2010-05-06 21:20:47 +02:00
|
|
|
windows.wxMSW.hostDrv = nativePlatforms;
|
2010-05-06 20:47:35 +02:00
|
|
|
};
|
2010-05-12 17:46:55 +02:00
|
|
|
}) // (
|
|
|
|
|
2012-05-25 00:07:23 +02: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 {
|
|
|
|
coreutils.hostDrv = nativePlatforms;
|
|
|
|
boehmgc.hostDrv = nativePlatforms;
|
|
|
|
gmp.hostDrv = nativePlatforms;
|
|
|
|
guile_1_8.hostDrv = nativePlatforms;
|
|
|
|
libffi.hostDrv = nativePlatforms;
|
|
|
|
libtool.hostDrv = nativePlatforms;
|
|
|
|
libunistring.hostDrv = nativePlatforms;
|
|
|
|
windows.wxMSW.hostDrv = nativePlatforms;
|
|
|
|
};
|
|
|
|
}) // (
|
|
|
|
|
2010-05-12 17:46:55 +02: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 15:02:31 +02:00
|
|
|
openssl.system = "hurd-x86"; # Nix depends on OpenSSL.
|
2010-05-12 17:46:55 +02:00
|
|
|
};
|
|
|
|
in {
|
2010-05-21 17:07:54 +02:00
|
|
|
crossGNU = mapTestOnCross crossSystem {
|
2011-11-19 15:27:37 +01:00
|
|
|
gnu.hurdCross = nativePlatforms;
|
|
|
|
gnu.mach.hostDrv = nativePlatforms;
|
|
|
|
gnu.mig = nativePlatforms;
|
2012-02-27 18:50:44 +01:00
|
|
|
gnu.smbfs.hostDrv = nativePlatforms;
|
2010-05-21 17:07:54 +02:00
|
|
|
|
2011-02-15 14:15:55 +01:00
|
|
|
coreutils.hostDrv = nativePlatforms;
|
2010-05-21 17:07:54 +02:00
|
|
|
ed.hostDrv = nativePlatforms;
|
|
|
|
grub2.hostDrv = nativePlatforms;
|
|
|
|
inetutils.hostDrv = nativePlatforms;
|
2011-02-15 14:14:33 +01:00
|
|
|
boehmgc.hostDrv = nativePlatforms;
|
2011-06-12 23:53:56 +02:00
|
|
|
findutils.hostDrv = nativePlatforms;
|
|
|
|
gcc.hostDrv = nativePlatforms;
|
2011-11-29 23:54:22 +01:00
|
|
|
gcc46.hostDrv = nativePlatforms;
|
2011-06-12 23:53:56 +02:00
|
|
|
gdb.hostDrv = nativePlatforms;
|
2011-02-15 14:14:33 +01:00
|
|
|
gmp.hostDrv = nativePlatforms;
|
2011-06-12 23:53:56 +02:00
|
|
|
gnugrep.hostDrv = nativePlatforms;
|
|
|
|
gnumake.hostDrv = nativePlatforms;
|
|
|
|
gnused.hostDrv = nativePlatforms;
|
2011-02-15 14:14:33 +01:00
|
|
|
guile_1_8.hostDrv = nativePlatforms;
|
2011-11-14 10:57:13 +01:00
|
|
|
guile.hostDrv = nativePlatforms;
|
2011-02-15 14:14:33 +01:00
|
|
|
libffi.hostDrv = nativePlatforms;
|
|
|
|
libtool.hostDrv = nativePlatforms;
|
|
|
|
libunistring.hostDrv = nativePlatforms;
|
2011-06-12 23:53:56 +02:00
|
|
|
lsh.hostDrv = nativePlatforms;
|
2010-05-21 17:07:54 +02:00
|
|
|
nixUnstable.hostDrv = nativePlatforms;
|
2012-01-06 15:07:08 +01:00
|
|
|
openssl.hostDrv = nativePlatforms; # dependency of Nix
|
2010-05-21 17:07:54 +02:00
|
|
|
patch.hostDrv = nativePlatforms;
|
2012-02-23 01:01:24 +01:00
|
|
|
samba_light.hostDrv = nativePlatforms; # needed for `runInGenericVM'
|
2010-05-21 17:07:54 +02:00
|
|
|
zile.hostDrv = nativePlatforms;
|
|
|
|
};
|
2010-09-02 20:41:48 +02:00
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Linux on the fuloong */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "mips64el-unknown-linux";
|
|
|
|
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 {
|
|
|
|
|
2011-02-15 14:15:55 +01:00
|
|
|
coreutils.hostDrv = nativePlatforms;
|
2010-09-02 20:41:48 +02:00
|
|
|
ed.hostDrv = nativePlatforms;
|
|
|
|
grub2.hostDrv = nativePlatforms;
|
|
|
|
inetutils.hostDrv = nativePlatforms;
|
|
|
|
nixUnstable.hostDrv = nativePlatforms;
|
|
|
|
patch.hostDrv = nativePlatforms;
|
|
|
|
zile.hostDrv = nativePlatforms;
|
|
|
|
};
|
|
|
|
}) // (
|
|
|
|
|
|
|
|
/* Linux on the Ben Nanonote */
|
|
|
|
let
|
|
|
|
crossSystem = {
|
|
|
|
config = "mipsel-unknown-linux";
|
|
|
|
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 {
|
|
|
|
|
2011-02-15 14:15:55 +01:00
|
|
|
coreutils.hostDrv = nativePlatforms;
|
2010-09-02 20:41:48 +02:00
|
|
|
ed.hostDrv = nativePlatforms;
|
|
|
|
inetutils.hostDrv = nativePlatforms;
|
|
|
|
nixUnstable.hostDrv = nativePlatforms;
|
|
|
|
patch.hostDrv = nativePlatforms;
|
|
|
|
zile.hostDrv = nativePlatforms;
|
2010-10-13 22:47:24 +02:00
|
|
|
prboom.hostDrv = nativePlatforms;
|
|
|
|
vim.hostDrv = nativePlatforms;
|
|
|
|
lynx.hostDrv = nativePlatforms;
|
|
|
|
patchelf.hostDrv = nativePlatforms;
|
|
|
|
nix.hostDrv = nativePlatforms;
|
|
|
|
fossil.hostDrv = nativePlatforms;
|
|
|
|
binutils.hostDrv = nativePlatforms;
|
|
|
|
mpg123.hostDrv = nativePlatforms;
|
|
|
|
yacas.hostDrv = nativePlatforms;
|
2010-09-02 20:41:48 +02:00
|
|
|
};
|
2010-03-09 11:33:31 +01:00
|
|
|
})
|