diff options
Diffstat (limited to 'pkgs/top-level/release-cross.nix')
-rw-r--r-- | pkgs/top-level/release-cross.nix | 100 |
1 files changed, 55 insertions, 45 deletions
diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 824289726995..31ce31a67595 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -1,5 +1,8 @@ -{ # The platforms for which we build Nixpkgs. - supportedSystems ? [ builtins.currentSystem ] +/* This file defines some basic smoke tests for cross compilation. +*/ + +{ # The platforms *from* which we cross compile. + supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ] , # Strip most of attributes when evaluating to spare memory usage scrubJobs ? true }: @@ -9,22 +12,39 @@ with import ./release-lib.nix { inherit supportedSystems scrubJobs; }; let nativePlatforms = linux; - /* Basic list of packages to cross-build */ - basicCrossDrv = { + common = { + buildPackages.binutils = nativePlatforms; + gmp = nativePlatforms; + }; + + gnuCommon = common // { + buildPackages.gccCrossStageFinal = nativePlatforms; + coreutils = nativePlatforms; + }; + + linuxCommon = gnuCommon // { + buildPackages.gdbCross = nativePlatforms; + bison = nativePlatforms; busybox = nativePlatforms; - coreutils = nativePlatforms; dropbear = nativePlatforms; + ed = nativePlatforms; + ncurses = nativePlatforms; + patch = nativePlatforms; }; - /* Basic list of packages to be natively built, - but need a crossSystem defined to get meaning */ - basicNativeDrv = { - buildPackages.gccCrossStageFinal = nativePlatforms; - buildPackages.gdbCross = nativePlatforms; + windowsCommon = gnuCommon // { + boehmgc = nativePlatforms; + guile_1_8 = nativePlatforms; + libffi = nativePlatforms; + libtool = nativePlatforms; + libunistring = nativePlatforms; + windows.wxMSW = nativePlatforms; }; - basic = basicCrossDrv // basicNativeDrv; + darwinCommon = { + buildPackages.binutils = darwin; + }; in @@ -68,6 +88,21 @@ in guile = nativePlatforms; }; + darwinToAarch64 = let + crossSystem = { + config = "aarch64-apple-darwin14"; + arch = "arm64"; + libc = "libSystem"; + }; + in mapTestOnCross crossSystem darwinCommon; + + darwinToArm = let + crossSystem = { + config = "arm-apple-darwin10"; + arch = "armv7-a"; + libc = "libSystem"; + }; + in mapTestOnCross crossSystem darwinCommon; /* Test some cross builds to the Sheevaplug */ crossSheevaplugLinux = let @@ -81,7 +116,7 @@ in libc = "glibc"; openssl.system = "linux-generic32"; }; - in mapTestOnCross crossSystem (basic // { + in mapTestOnCross crossSystem (linuxCommon // { ubootSheevaplug = nativePlatforms; }); @@ -89,48 +124,30 @@ in /* Test some cross builds on 32 bit mingw-w64 */ crossMingw32 = let crossSystem = { - config = "i686-w64-mingw32"; + config = "i686-pc-mingw32"; arch = "x86"; # Irrelevant libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - boehmgc = nativePlatforms; - gmp = nativePlatforms; - guile_1_8 = nativePlatforms; - libffi = nativePlatforms; - libtool = nativePlatforms; - libunistring = nativePlatforms; - windows.wxMSW = nativePlatforms; - }; + in mapTestOnCross crossSystem windowsCommon; /* Test some cross builds on 64 bit mingw-w64 */ crossMingwW64 = let crossSystem = { # That's the triplet they use in the mingw-w64 docs. - config = "x86_64-w64-mingw32"; + config = "x86_64-pc-mingw32"; arch = "x86_64"; # Irrelevant libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - boehmgc = nativePlatforms; - gmp = nativePlatforms; - guile_1_8 = nativePlatforms; - libffi = nativePlatforms; - libtool = nativePlatforms; - libunistring = nativePlatforms; - windows.wxMSW = nativePlatforms; - }; + in mapTestOnCross crossSystem windowsCommon; /* Linux on the fuloong */ fuloongminipc = let crossSystem = { - config = "mips64el-unknown-linux"; + config = "mips64el-unknown-linux-gnu"; bigEndian = false; arch = "mips"; float = "hard"; @@ -143,11 +160,7 @@ in abi = "n32"; }; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - ed = nativePlatforms; - patch = nativePlatforms; - }; + in mapTestOnCross crossSystem linuxCommon; /* Linux on Raspberrypi */ @@ -169,10 +182,7 @@ in abi = "aapcs-linux"; }; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - ed = nativePlatforms; - patch = nativePlatforms; + in mapTestOnCross crossSystem (linuxCommon // { vim = nativePlatforms; unzip = nativePlatforms; ddrescue = nativePlatforms; @@ -180,7 +190,7 @@ in patchelf = nativePlatforms; buildPackages.binutils = nativePlatforms; mpg123 = nativePlatforms; - }; + }); /* Cross-built bootstrap tools for every supported platform */ |