reewide: Purge all uses stdenv.system and top-level system

It is deprecated and will be removed after 18.09.
This commit is contained in:
John Ericson
2018-08-20 15:11:29 -04:00
parent 94f71d800d
commit 2c2f1e37d4
263 changed files with 594 additions and 577 deletions

View File

@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
configureFlags =
# Including the Windows headers breaks unistd.h.
# Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
stdenv.lib.optional (stdenv.system == "i686-cygwin") "ac_cv_header_windows_h=no";
stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no";
enableParallelBuilding = true;

View File

@@ -41,8 +41,8 @@ let
dontBuild = true;
installPhase =
let so =
if bass.so ? ${stdenv.system} then bass.so.${stdenv.system}
else throw "${name} not packaged for ${stdenv.system} (yet).";
if bass.so ? ${stdenv.hostPlatform.system} then bass.so.${stdenv.hostPlatform.system}
else throw "${name} not packaged for ${stdenv.hostPlatform.system} (yet).";
in ''
mkdir -p $out/{lib,include}
install -m644 -t $out/lib/ ${so}

View File

@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
platform =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "macosx"
else throw "unrecognized system ${stdenv.system}";
else throw "unrecognized system ${stdenv.hostPlatform.system}";
buildInputs = [ premake4 ];

View File

@@ -12,9 +12,10 @@ stdenv.mkDerivation rec {
sha256 = "1yk7jyf4va9425cg05llskpls2jm7n3jwy2hj5jm74zkr4mwpvl7";
};
patches = with stdenv;
lib.optional (system != "i686-cygwin") ./dll.patch
++ lib.optional isDarwin ./GNUmakefile-darwin.patch;
patches = stdenv.lib.concatLists [
(stdenv.lib.optional (stdenv.hostPlatform.system != "i686-cygwin") ./dll.patch)
(stdenv.lib.optional stdenv.hostPlatform.isDarwin ./GNUmakefile-darwin.patch)
];
configurePhase = let

View File

@@ -7,7 +7,10 @@
, withPython ? false, swig2 ? null, python ? null
}:
let inherit (stdenv) lib system; in
let
inherit (stdenv) lib;
inherit (stdenv.hostPlatform) system;
in
stdenv.mkDerivation rec {
name = "gpgme-${version}";

View File

@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
];
# https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
doCheck = stdenv.system != "i686-linux" && stdenv.system != "aarch64-linux";
doCheck = stdenv.hostPlatform.system != "i686-linux" && stdenv.hostPlatform.system != "aarch64-linux";
meta = {
description = "The GNU Scientific Library, a large numerical library";

View File

@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zeromq3 jdk ];
preConfigure = ''
${if stdenv.system == "x86_64-darwin" then
${if stdenv.hostPlatform.system == "x86_64-darwin" then
'' sed -i -e 's~/Headers~/include~' -e 's~_JNI_INC_SUBDIRS=\".*\"~_JNI_INC_SUBDIRS=\"darwin\"~' configure
'' else ""}
'';

View File

@@ -16,7 +16,7 @@ let
sha256 = "00k1mfbncvyh8klgmk0891w8jwnd5niqb16j1j8yacrm2smmlb05"; };
};
metadata = assert platformMap ? ${stdenv.system}; platformMap.${stdenv.system};
metadata = assert platformMap ? ${stdenv.hostPlatform.system}; platformMap.${stdenv.hostPlatform.system};
in stdenv.mkDerivation rec {
version = "4.5";

View File

@@ -2,26 +2,26 @@
let
version = "12.1.51";
isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux");
isLinux = (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "i686-linux");
in
if (stdenv.system != "x86_64-linux" && stdenv.system != "x86_64-darwin" && stdenv.system != "i686-linux")
if (stdenv.hostPlatform.system != "x86_64-linux" && stdenv.hostPlatform.system != "x86_64-darwin" && stdenv.hostPlatform.system != "i686-linux")
then throw "Check https://developer.spotify.com/technologies/libspotify/ for a tarball for your system and add it here"
else stdenv.mkDerivation {
name = "libspotify-${version}";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-x86_64-release.tar.gz";
sha256 = "0n0h94i4xg46hfba95n3ypah93crwb80bhgsg00f6sms683lx8a3";
}
else if stdenv.system == "x86_64-darwin" then
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Darwin-universal.zip";
sha256 = "1gcgrc8arim3hnszcc886lmcdb4iigc08abkaa02l6gng43ky1c0";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://developer.spotify.com/download/libspotify/libspotify-${version}-Linux-i686-release.tar.gz";
sha256 = "1bjmn64gbr4p9irq426yap4ipq9rb84zsyhjjr7frmmw22xb86ll";
@@ -46,7 +46,7 @@ else stdenv.mkDerivation {
# darwin-specific
buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip;
buildInputs = stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") unzip;
# linux-specific
installFlags = stdenv.lib.optionalString (isLinux)

View File

@@ -28,7 +28,7 @@ stdenv.mkDerivation {
i686-linux = "linux";
x86_64-linux = "linux-64bit";
aarch64-linux = "linux-64bit";
}.${stdenv.system}}
}.${stdenv.hostPlatform.system}}
'';
installPhase = ''

View File

@@ -23,7 +23,7 @@
with stdenv.lib;
if ! lists.elem stdenv.system platforms.mesaPlatforms then
if ! lists.elem stdenv.hostPlatform.system platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
else

View File

@@ -16,11 +16,11 @@ stdenv.mkDerivation (rec {
nativeBuildInputs = [ gnum4 ];
propagatedBuildInputs = [ gmp ];
doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin);
doCheck = (stdenv.hostPlatform.system != "i686-cygwin" && !stdenv.isDarwin);
enableParallelBuilding = true;
patches = stdenv.lib.optional (stdenv.system == "i686-cygwin")
patches = stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin")
./cygwin.patch;
meta = with stdenv.lib; {

View File

@@ -63,11 +63,11 @@ let
sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8";
} + "/ippicv";
files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
{ ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; }
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
{ ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; }
else if stdenv.system == "x86_64-darwin" then
else if stdenv.hostPlatform.system == "x86_64-darwin" then
{ ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; }
else
throw "ICV is not available for this platform (or not yet supported by this package)";

View File

@@ -14,12 +14,12 @@ let
sha256 = hash;
});
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
arch = {
"x86_64-linux" = "linux.x64";
"x86_64-darwin" = "macos.x64";
}."${stdenv.system}" or throwSystem;
}."${stdenv.hostPlatform.system}" or throwSystem;
srcs = {
"x86_64-linux" = [
@@ -32,7 +32,7 @@ let
(requireSource "sdk" arch version "2" "e0befca9c4e71ebc9f444957ffa70f01aeeec5976ea27c40406471b04c34848b")
(requireSource "sqlplus" arch version "2" "d147cbb5b2a954fdcb4b642df4f0bd1153fd56e0f56e7fa301601b4f7e2abe0e") ]
++ optional odbcSupport (requireSource "odbc" arch version "2" "1805c1ab6c8c5e8df7bdcc35d7f2b94c329ecf4dff9bde55d5f9b159ecd8b64e");
}."${stdenv.system}" or throwSystem;
}."${stdenv.hostPlatform.system}" or throwSystem;
extLib = stdenv.hostPlatform.extensions.sharedLibrary;
in stdenv.mkDerivation rec {

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl }:
let
fetch = { version, src ? builtins.getAttr stdenv.system sources, sources ? null }:
fetch = { version, src ? builtins.getAttr stdenv.hostPlatform.system sources, sources ? null }:
{
inherit version src;
};

View File

@@ -67,15 +67,15 @@ in
let
config =
configs.${stdenv.system}
or (throw "unsupported system: ${stdenv.system}");
configs.${stdenv.hostPlatform.system}
or (throw "unsupported system: ${stdenv.hostPlatform.system}");
in
let
blas64 =
if blas64_ != null
then blas64_
else hasPrefix "x86_64" stdenv.system;
else hasPrefix "x86_64" stdenv.hostPlatform.system;
in
stdenv.mkDerivation rec {
name = "openblas-${version}";

View File

@@ -5,11 +5,11 @@ assert stdenv ? cc && stdenv.cc.libc != null;
stdenv.mkDerivation rec {
name = "scmccid-5.0.11";
src = if stdenv.system == "i686-linux" then (fetchurl {
src = if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux.tar.gz";
sha256 = "1r5wkarhzl09ncgj55baizf573czw0nplh1pgddzx9xck66kh5bm";
})
else if stdenv.system == "x86_64-linux" then (fetchurl {
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
url = "http://www.scmmicro.com/support/download/scmccid_5.0.11_linux_x64.tar.gz";
sha256 = "0k9lzlk01sl4ycfqgrqqy3bildz0mcr1r0kkicgjz96l4s0jgz0i";
})

View File

@@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
# Explicitly setting target ensures code can be compiled against a skalibs
# binary built on a different version of darwin.
# http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.system}");
++ (stdenv.lib.optional stdenv.isDarwin "--build=${stdenv.hostPlatform.system}");
postInstall = ''
mkdir -p $doc/share/doc/skalibs

View File

@@ -34,15 +34,15 @@ stdenv.mkDerivation rec {
export USEPNG=" -DUSEPNG"
export PNGLIB=" -lpng -lz"
'';
arch = if stdenv.system == "x86_64-linux" then "linux-64-thr" else
if stdenv.system == "i686-linux" then "linux-thr" else
if stdenv.system == "aarch64-linux" then "linux-arm-thr" else
if stdenv.system == "armv7l-linux" then "linux-arm-thr" else
if stdenv.system == "x86_64-darwin" then "macosx-thr" else
if stdenv.system == "i686-darwin" then "macosx-64-thr" else
if stdenv.system == "i686-cygwin" then "win32" else
if stdenv.system == "x86_64-freebsd" then "bsd" else
if stdenv.system == "x686-freebsd" then "bsd" else
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "linux-64-thr" else
if stdenv.hostPlatform.system == "i686-linux" then "linux-thr" else
if stdenv.hostPlatform.system == "aarch64-linux" then "linux-arm-thr" else
if stdenv.hostPlatform.system == "armv7l-linux" then "linux-arm-thr" else
if stdenv.hostPlatform.system == "x86_64-darwin" then "macosx-thr" else
if stdenv.hostPlatform.system == "i686-darwin" then "macosx-64-thr" else
if stdenv.hostPlatform.system == "i686-cygwin" then "win32" else
if stdenv.hostPlatform.system == "x86_64-freebsd" then "bsd" else
if stdenv.hostPlatform.system == "x686-freebsd" then "bsd" else
throw "Don't know what arch to select for tachyon build";
makeFlags = "${arch}";
patches = [

View File

@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
installPhase = ''
install -vD out/Release/d8 "$out/bin/d8"
${if stdenv.system == "x86_64-darwin" then ''
${if stdenv.hostPlatform.system == "x86_64-darwin" then ''
install -vD out/Release/lib.target/libv8.dylib "$out/lib/libv8.dylib"
'' else ''
install -vD out/Release/lib.target/libv8.so "$out/lib/libv8.so"

View File

@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
preConfigure = "cmakeFlags+=\" -DVIGRANUMPY_INSTALL_DIR=$out/lib/${python.libPrefix}/site-packages\"";
cmakeFlags = [ "-DWITH_OPENEXR=1" ]
++ stdenv.lib.optionals (stdenv.system == "x86_64-linux")
++ stdenv.lib.optionals (stdenv.hostPlatform.system == "x86_64-linux")
[ "-DCMAKE_CXX_FLAGS=-fPIC" "-DCMAKE_C_FLAGS=-fPIC" ];
enableParallelBuilding = true;

View File

@@ -15,7 +15,7 @@ stdenv.mkDerivation {
# in stdenv linux headers
# BUILD_BRL fails to find open()
cmakeFlags = "-DBUILD_TESTING=OFF -DBUILD_OUL=OFF -DBUILD_BRL=OFF -DBUILD_CONTRIB=OFF "
+ (if stdenv.system == "x86_64-linux" then
+ (if stdenv.hostPlatform.system == "x86_64-linux" then
"-DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC"
else
"");

View File

@@ -1,6 +1,6 @@
{ stdenv, requireFile, unzip, xorg }:
assert stdenv.system == "i686-linux";
assert stdenv.hostPlatform.system == "i686-linux";
stdenv.mkDerivation rec {
name = "sun-java-wtk-2.5.2_01";