diff options
author | John Ericson <Ericson2314@yahoo.com> | 2018-05-10 01:54:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-10 01:54:35 -0400 |
commit | e659c324484aa610c84ca76424b0e17502789e8c (patch) | |
tree | e5c5955da06fec2ae98b76ee188967e3d45fa829 | |
parent | 3390592cfc5d5406f7316a31661e6b0eeb2d352b (diff) | |
parent | c17f79ea3b633741bab2d0c88e554f8c9864acb7 (diff) | |
download | nixlib-e659c324484aa610c84ca76424b0e17502789e8c.tar nixlib-e659c324484aa610c84ca76424b0e17502789e8c.tar.gz nixlib-e659c324484aa610c84ca76424b0e17502789e8c.tar.bz2 nixlib-e659c324484aa610c84ca76424b0e17502789e8c.tar.lz nixlib-e659c324484aa610c84ca76424b0e17502789e8c.tar.xz nixlib-e659c324484aa610c84ca76424b0e17502789e8c.tar.zst nixlib-e659c324484aa610c84ca76424b0e17502789e8c.zip |
Merge pull request #40270 from obsidiansystems/lib-platform-simplify
treewide: Get rid of `*Platform.arch`
-rw-r--r-- | lib/systems/examples.nix | 12 | ||||
-rw-r--r-- | pkgs/applications/video/omxplayer/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/ffmpeg-full/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/ffmpeg/generic.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/fontconfig/2.10.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/fontconfig/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/libav/default.nix | 2 |
7 files changed, 11 insertions, 17 deletions
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 06e7624967b9..7b34513d8378 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -11,22 +11,19 @@ rec { sheevaplug = rec { config = "armv5tel-unknown-linux-gnueabi"; - arch = "armv5tel"; float = "soft"; platform = platforms.sheevaplug; }; raspberryPi = rec { config = "armv6l-unknown-linux-gnueabihf"; - arch = "armv6l"; float = "hard"; fpu = "vfp"; platform = platforms.raspberrypi; }; armv7l-hf-multiplatform = rec { - config = "arm-unknown-linux-gnueabihf"; - arch = "armv7-a"; + config = "armv7a-unknown-linux-gnueabihf"; float = "hard"; fpu = "vfpv3-d16"; platform = platforms.armv7l-hf-multiplatform; @@ -34,13 +31,11 @@ rec { aarch64-multiplatform = rec { config = "aarch64-unknown-linux-gnu"; - arch = "aarch64"; platform = platforms.aarch64-multiplatform; }; aarch64-android-prebuilt = rec { config = "aarch64-unknown-linux-android"; - arch = "aarch64"; platform = platforms.aarch64-multiplatform; useAndroidPrebuilt = true; }; @@ -51,7 +46,6 @@ rec { }; pogoplug4 = rec { - arch = "armv5tel"; config = "armv5tel-unknown-linux-gnueabi"; float = "soft"; platform = platforms.pogoplug4; @@ -59,7 +53,6 @@ rec { ben-nanonote = rec { config = "mipsel-unknown-linux-uclibc"; - arch = "mips"; float = "soft"; platform = { name = "ben_nanonote"; @@ -73,7 +66,6 @@ rec { fuloongminipc = rec { config = "mipsel-unknown-linux-gnu"; - arch = "mips"; float = "hard"; platform = platforms.fuloong2f_n32; }; @@ -142,7 +134,6 @@ rec { # 32 bit mingw-w64 mingw32 = { config = "i686-pc-mingw32"; - arch = "x86"; # Irrelevant libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; @@ -151,7 +142,6 @@ rec { mingwW64 = { # That's the triplet they use in the mingw-w64 docs. config = "x86_64-pc-mingw32"; - arch = "x86_64"; # Irrelevant libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix index 825bfe7955a8..520451df400f 100644 --- a/pkgs/applications/video/omxplayer/default.nix +++ b/pkgs/applications/video/omxplayer/default.nix @@ -52,7 +52,7 @@ let "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=linux" - "--arch=${hostPlatform.arch}" + "--arch=${hostPlatform.parsed.cpu.name}" ]; }; diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index db39be465485..d2ef075beee1 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -443,7 +443,7 @@ stdenv.mkDerivation rec { "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=${hostPlatform.parsed.kernel.name}" - "--arch=${hostPlatform.arch}" + "--arch=${hostPlatform.parsed.cpu.name}" ]; }; diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 4a05eab87bd7..530639d757de 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -176,7 +176,7 @@ stdenv.mkDerivation rec { "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=${hostPlatform.parsed.kernel.name}" - "--arch=${hostPlatform.arch}" + "--arch=${hostPlatform.parsed.cpu.name}" ]; }; diff --git a/pkgs/development/libraries/fontconfig/2.10.nix b/pkgs/development/libraries/fontconfig/2.10.nix index 3f3c04b15a30..5fb0ea4429e7 100644 --- a/pkgs/development/libraries/fontconfig/2.10.nix +++ b/pkgs/development/libraries/fontconfig/2.10.nix @@ -24,7 +24,9 @@ stdenv.mkDerivation rec { ]; # We should find a better way to access the arch reliably. - crossArch = hostPlatform.arch or null; + crossArch = if stdenv.hostPlatform != stdenv.buildPlatform + then hostPlatform.parsed.cpu.name + else null; preConfigure = '' if test -n "$crossConfig"; then diff --git a/pkgs/development/libraries/fontconfig/default.nix b/pkgs/development/libraries/fontconfig/default.nix index 29838fe1ffa1..a4f6fe007d06 100644 --- a/pkgs/development/libraries/fontconfig/default.nix +++ b/pkgs/development/libraries/fontconfig/default.nix @@ -47,7 +47,9 @@ stdenv.mkDerivation rec { ]; # We should find a better way to access the arch reliably. - crossArch = hostPlatform.arch or null; + crossArch = if stdenv.hostPlatform != stdenv.buildPlatform + then hostPlatform.parsed.cpu.name + else null; preConfigure = '' if test -n "$crossConfig"; then diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index 317768518c39..85fe902dae06 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -118,7 +118,7 @@ let "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=linux" - "--arch=${hostPlatform.arch}" + "--arch=${hostPlatform.parsed.cpu.name}" ]; }; |