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

@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
version = "7.0.2";
src =
if stdenv.system == "i686-linux"
if stdenv.hostPlatform.system == "i686-linux"
then requireFile {
name = "cov-analysis-linux32-${version}.tar.gz";
sha256 = "0i06wbd7blgx9adh9w09by4i18vwmldfp9ix97a5dph2cjymsviy";

View File

@@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
'';
configureFlags =
stdenv.lib.optional (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin") "--enable-only64bit";
stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin") "--enable-only64bit";
doCheck = false; # fails

View File

@@ -4,7 +4,7 @@ let
version = "1.8.2";
name = "electron-${version}";
throwSystem = throw "Unsupported system: ${stdenv.system}";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
meta = with stdenv.lib; {
description = "Cross platform desktop application shell";
@@ -34,7 +34,7 @@ let
url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip";
sha256 = "0k4np2d4y15x1qfay8y9m8v9y223vdpbq5fdxa3ywbbyf8j361zd";
};
}.${stdenv.system} or throwSystem;
}.${stdenv.hostPlatform.system} or throwSystem;
buildInputs = [ unzip makeWrapper ];

View File

@@ -1,9 +1,9 @@
{ stdenv, fetchurl }:
let
linuxPredicate = stdenv.system == "x86_64-linux";
bsdPredicate = stdenv.system == "x86_64-freebsd";
darwinPredicate = stdenv.system == "x86_64-darwin";
linuxPredicate = stdenv.hostPlatform.system == "x86_64-linux";
bsdPredicate = stdenv.hostPlatform.system == "x86_64-freebsd";
darwinPredicate = stdenv.hostPlatform.system == "x86_64-darwin";
metadata = assert linuxPredicate || bsdPredicate || darwinPredicate;
if linuxPredicate then
{ arch = "linux-amd64";

View File

@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
name = "google-app-engine-go-sdk-${version}";
version = "1.9.61";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchzip {
url = "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-${version}.zip";
sha256 = "1i2j9ympl1218akwsmm7yb31v0gibgpzlb657bcravi1irfv1hhs";

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gettext ] ++
# We don't have Emacs/GTK/etc. on {Dar,Cyg}win.
stdenv.lib.optional
(! (stdenv.lib.lists.any (x: stdenv.system == x)
(! (stdenv.lib.lists.any (x: stdenv.hostPlatform.system == x)
[ "i686-cygwin" ]))
emacs;

View File

@@ -1,15 +1,15 @@
{ stdenv, fetchurl, gnuplot }:
let
target = if stdenv.system == "i686-linux" then
target = if stdenv.hostPlatform.system == "i686-linux" then
"linux"
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
"linux-AMD64"
else if stdenv.system == "x86_64-darwin" then
else if stdenv.hostPlatform.system == "x86_64-darwin" then
"macosx"
else if stdenv.system == "aarch64-linux" then
else if stdenv.hostPlatform.system == "aarch64-linux" then
"linux-arm"
else throw "Platform ${stdenv.system} not yet supported.";
else throw "Platform ${stdenv.hostPlatform.system} not yet supported.";
in
stdenv.mkDerivation rec {

View File

@@ -6,7 +6,7 @@ let
archOverrides = {
"i686" = "x86";
};
info = splitString "-" stdenv.system;
info = splitString "-" stdenv.hostPlatform.system;
arch = (elemAt info 0);
elasticArch = archOverrides."${arch}" or arch;
plat = elemAt info 1;
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${elasticArch}.tar.gz";
sha256 = shas."${stdenv.system}" or (throw "Unknown architecture");
sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
};
buildInputs = [ makeWrapper ];

View File

@@ -12,7 +12,7 @@
with stdenv.lib;
let
inherit (builtins) elemAt;
info = splitString "-" stdenv.system;
info = splitString "-" stdenv.hostPlatform.system;
arch = elemAt info 0;
plat = elemAt info 1;
shas =
@@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://artifacts.elastic.co/downloads/kibana/${name}-${plat}-${arch}.tar.gz";
sha256 = shas."${stdenv.system}" or (throw "Unknown architecture");
sha256 = shas."${stdenv.hostPlatform.system}" or (throw "Unknown architecture");
};
buildInputs = [ makeWrapper ];

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchurl, buildPackages, ncurses }:
let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in
let dialect = with stdenv.lib; last (splitString "-" stdenv.hostPlatform.system); in
stdenv.mkDerivation rec {
name = "lsof-${version}";

View File

@@ -27,13 +27,13 @@ stdenv.mkDerivation rec {
name = "${pname}-${version}";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
name = "saleae-logic-${version}-32bit.zip";
url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(32-bit).zip";
sha256 = "1dyrj07cgj2fvwi1sk97vady9ri8f8n7mxy9zyzmw9isngs7bmll";
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
name = "saleae-logic-${version}-64bit.zip";
url = "http://downloads.saleae.com/logic/${version}/Logic%20${version}%20(64-bit).zip";

View File

@@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
name = "neoload-4.1.4";
src = fetchurl (
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
{ url = http://neoload.installers.neotys.com/documents/download/neoload/v4.1/neoload_4_1_4_linux_x64.sh;
sha256 = "199jcf5a0nwfm8wfld2rcjgq64g91vvz2bkmki8dxfzf1yasifcd"; }
else

View File

@@ -3,7 +3,7 @@
, gdk_pixbuf, cairo, nss, nspr, gconf, expat, systemd, libcap
, libnotify}:
let
bits = if stdenv.system == "x86_64-linux" then "x64"
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32";
nwEnv = buildEnv {

View File

@@ -7,7 +7,7 @@
, sqlite, udev
}:
let
bits = if stdenv.system == "x86_64-linux" then "x64"
bits = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
else "ia32";
nwEnv = buildEnv {

View File

@@ -12,13 +12,13 @@ stdenv.mkDerivation rec {
# because it has bundled a lot of external libraries (like QT and Webkit)
# and no easy/nice way to use the system versions of these
src = if stdenv.system == "i686-linux" then
src = if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-i686.tar.bz2";
sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1";
}
else
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://bitbucket.org/ariya/phantomjs/downloads/${name}-linux-x86_64.tar.bz2";
sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1";

View File

@@ -7,10 +7,10 @@ stdenv.mkDerivation rec {
version = "4.4.12";
src = fetchurl (
if stdenv.system == "x86_64-linux" then {
if stdenv.hostPlatform.system == "x86_64-linux" then {
url = "https://saucelabs.com/downloads/sc-${version}-linux.tar.gz";
sha256 = "1yqvx64bgiq27hdhwkzgmzyib8pbjn1idpq6783srxq64asf6iyw";
} else if stdenv.system == "i686-linux" then {
} else if stdenv.hostPlatform.system == "i686-linux" then {
url = "https://saucelabs.com/downloads/sc-${version}-linux32.tar.gz";
sha256 = "02kib56lv4lhwkj5r15484lvvbyjvf9ydi5vccsmxgsxrzmddnl6";
} else {

View File

@@ -15,8 +15,8 @@ let
};
};
spec = allSpecs."${stdenv.system}"
or (throw "missing chromedriver binary for ${stdenv.system}");
spec = allSpecs."${stdenv.hostPlatform.system}"
or (throw "missing chromedriver binary for ${stdenv.hostPlatform.system}");
libs = stdenv.lib.makeLibraryPath [
stdenv.cc.cc.lib