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

@@ -29,7 +29,7 @@ let
};
armv6l-linux = armv7l-linux;
};
cfg = options."${stdenv.system}" or (throw "missing source url for platform ${stdenv.system}");
cfg = options."${stdenv.hostPlatform.system}" or (throw "missing source url for platform ${stdenv.hostPlatform.system}");
in
stdenv.mkDerivation rec {

View File

@@ -4,11 +4,11 @@ stdenv.mkDerivation rec {
name = "clean-2.4";
src =
if stdenv.system == "i686-linux" then (fetchurl {
if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
url = "http://clean.cs.ru.nl/download/Clean24/linux/clean2.4_boot.tar.gz";
sha256 = "1w8vvmkwzq8g51639r62apcy75sj69nm08082a34xvqm9ymfgkq5";
})
else if stdenv.system == "x86_64-linux" then (fetchurl {
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
url = "https://clean.cs.ru.nl/download/Clean24/linux/clean2.4_64_boot.tar.gz";
sha256 = "08gsa1pjl5wyzh4ah8ccfx8a7mdcn6ycsn1lzkrr9adygv1gmm7r";
})

View File

@@ -1,7 +1,7 @@
{stdenv, fetchurl}:
let
inherit (stdenv) system;
inherit (stdenv.hostPlatform) system;
version = "21b";
downloadUrl = arch:
"http://common-lisp.net/project/cmucl/downloads/release/" +

View File

@@ -15,14 +15,14 @@ stdenv.mkDerivation rec {
"x86_64-linux" = "linux-x86_64";
"i686-linux" = "linux-i686";
"x86_64-darwin" = "darwin-x86_64";
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
}."${stdenv.hostPlatform.system}" or (throw "system ${stdenv.hostPlatform.system} not supported");
in fetchurl {
url = "https://github.com/crystal-lang/crystal/releases/download/0.26.0/${prebuiltName}-${arch}.tar.gz";
sha256 = {
"x86_64-linux" = "1xban102yiiwmlklxvn3xp3q546bp8hlxxpakayajkhhnpl6yv45";
"i686-linux" = "1igspf1lrv7wpmz0pfrkbx8m1ykvnv4zhic53cav4nicppm2v0ic";
"x86_64-darwin" = "0hzc65ccajr0yhmvi5vbdgbzbp1gbjy56da24ds3zwwkam1ddk0k";
}."${stdenv.system}";
}."${stdenv.hostPlatform.system}";
};
unpackPhase = ''

View File

@@ -4,17 +4,17 @@ stdenv.mkDerivation {
name = "fpc-2.6.0-binary";
src =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.i386-linux.tar";
sha256 = "08yklvrfxvk59bxsd4rh1i6s3cjn0q06dzjs94h9fbq3n1qd5zdf";
}
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "mirror://sourceforge/project/freepascal/Linux/2.6.0/fpc-2.6.0.x86_64-linux.tar";
sha256 = "0k9vi75k39y735fng4jc2vppdywp82j4qhzn7x4r6qjkad64d8lx";
}
else throw "Not supported on ${stdenv.system}.";
else throw "Not supported on ${stdenv.hostPlatform.system}.";
builder = ./binary-builder.sh;

View File

@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ startFPC gawk ];
preConfigure =
if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
'' else "";

View File

@@ -59,7 +59,7 @@ let
};
bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.buildPlatform.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
in stdenv.mkDerivation {
name = bootGhcjs.name;

View File

@@ -134,12 +134,12 @@ stdenv.mkDerivation rec {
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "386"
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";

View File

@@ -134,12 +134,12 @@ stdenv.mkDerivation rec {
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else if stdenv.targetPlatform.isi686 then "386"
else if stdenv.targetPlatform.isx86_64 then "amd64"
else if stdenv.targetPlatform.isAarch32 then "arm"
else if stdenv.targetPlatform.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GOARM = stdenv.targetPlatform.parsed.cpu.version or "";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";

View File

@@ -128,11 +128,11 @@ stdenv.mkDerivation rec {
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "386"
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 0;

View File

@@ -134,12 +134,12 @@ stdenv.mkDerivation rec {
GOOS = if stdenv.isDarwin then "darwin" else "linux";
GOARCH = if stdenv.isDarwin then "amd64"
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "386"
else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GOARM = optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";

View File

@@ -10,13 +10,13 @@ let drv = stdenv.mkDerivation rec {
version = "152b1248.6";
name = pname + "-" + version;
src = if stdenv.system == "x86_64-linux" then
src = if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u${version}_linux_x64.tar.gz";
sha256 = "12l81g8zhaymh4rzyfl9nyzmpkgzc7wrphm3j4plxx129yn9i7d7";
}
else
throw "unsupported system: ${stdenv.system}";
throw "unsupported system: ${stdenv.hostPlatform.system}";
nativeBuildInputs = [ file ];

View File

@@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
makeFlags =
let
arch = head (splitString "-" stdenv.system);
arch = head (splitString "-" stdenv.hostPlatform.system);
march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
or (throw "unsupported architecture: ${arch}");
# Julia requires Pentium 4 (SSE2) or better

View File

@@ -14,15 +14,15 @@ stdenv.mkDerivation rec {
name = "mlton-${version}";
binSrc =
if stdenv.system == "i686-linux" then (fetchurl {
if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.x86-linux.tgz";
sha256 = "1kxjjmnw4xk2d9hpvz43w9dvyhb3025k4zvjx785c33nrwkrdn4j";
})
else if stdenv.system == "x86_64-linux" then (fetchurl {
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-linux.tgz";
sha256 = "0fyhwxb4nmpirjbjcvk9f6w67gmn2gkz7xcgz0xbfih9kc015ygn";
})
else if stdenv.system == "x86_64-darwin" then (fetchurl {
else if stdenv.hostPlatform.system == "x86_64-darwin" then (fetchurl {
url = "mirror://sourceforge/project/mlton/mlton/${version}/${name}-1.amd64-darwin.gmp-macports.tgz";
sha256 = "044wnh9hhg6if886xy805683k0as347xd37r0r1yi4x7qlxzzgx9";
})

View File

@@ -20,7 +20,7 @@ stdenv.mkDerivation {
preferLocalBuild = true;
src = binaries."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
src = binaries."${stdenv.hostPlatform.system}" or (throw "unsupported system: ${stdenv.hostPlatform.system}");
libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.cc

View File

@@ -10,17 +10,17 @@ stdenv.mkDerivation rec {
name = "nvidia-cg-toolkit-${version}";
src =
if stdenv.system == "x86_64-linux" then
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86_64.tgz";
sha256 = "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878";
}
else if stdenv.system == "i686-linux" then
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "http://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86.tgz";
sha256 = "cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879";
}
else throw "nvidia-cg-toolkit does not support platform ${stdenv.system}";
else throw "nvidia-cg-toolkit does not support platform ${stdenv.hostPlatform.system}";
installPhase = ''
for b in cgc cgfxcat cginfo

View File

@@ -5,15 +5,15 @@
stdenv.mkDerivation {
name = "opendylan-2013.2";
src = if stdenv.system == "x86_64-linux" then fetchurl {
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2;
sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
}
else if stdenv.system == "i686-linux" then fetchurl {
else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
url = https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2;
sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
}
else throw "platform ${stdenv.system} not supported.";
else throw "platform ${stdenv.hostPlatform.system} not supported.";
buildInputs = [ patchelf boehmgc gnused makeWrapper ];

View File

@@ -11,11 +11,11 @@ stdenv.mkDerivation {
fetchSubmodules = true;
};
buildInputs = (if stdenv.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
];
preConfigure = if stdenv.system == "i686-linux" then ''
preConfigure = if stdenv.hostPlatform.system == "i686-linux" then ''
mkdir -p $TMPDIR/mps
tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps
./autogen.sh
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
'';
configureFlags = [
(if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
(if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
];
buildPhase = "make 3-stage-bootstrap";

View File

@@ -13,7 +13,7 @@ let
* The JRE libraries are in directories that depend on the CPU.
*/
architecture =
if stdenv.system == "i686-linux" then
if stdenv.hostPlatform.system == "i686-linux" then
"i386"
else "amd64";

View File

@@ -46,7 +46,7 @@ let
x86_64-linux = "amd64";
armv7l-linux = "arm";
aarch64-linux = "aarch64";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
jce =
if installjce then
@@ -77,9 +77,9 @@ let result = stdenv.mkDerivation rec {
x86_64-linux = "jdk-${productVersion}u${patchVersion}-linux-x64.tar.gz";
armv7l-linux = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz";
aarch64-linux = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz";
}.${stdenv.system};
}.${stdenv.hostPlatform.system};
url = downloadUrl;
sha256 = sha256.${stdenv.system};
sha256 = sha256.${stdenv.hostPlatform.system};
};
nativeBuildInputs = [ file ]

View File

@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
'';
# https://bugzilla.gnome.org/show_bug.cgi?id=728129#c15
doCheck = stdenv.system != "i686-linux"; # not sure about cross-compiling
doCheck = stdenv.hostPlatform.system != "i686-linux"; # not sure about cross-compiling
meta = with stdenv.lib; {
description = "The Oil Runtime Compiler";

View File

@@ -8,8 +8,8 @@ stdenv.mkDerivation {
sha256 = "0wvl95gf4pjs93632g4wi0mw1glzzhjp9g4xg93ll2zxggbxibli";
};
ARCH = if stdenv.system == "i686-linux" then "linux32"
else if stdenv.system == "x86_64-linux" then "linux64"
ARCH = if stdenv.hostPlatform.system == "i686-linux" then "linux32"
else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
else throw "Unsupported system";
hardeningDisable = [ "format" ];

View File

@@ -16,19 +16,19 @@ let
};
platform =
if stdenv.system == "i686-linux"
if stdenv.hostPlatform.system == "i686-linux"
then "i686-unknown-linux-gnu"
else if stdenv.system == "x86_64-linux"
else if stdenv.hostPlatform.system == "x86_64-linux"
then "x86_64-unknown-linux-gnu"
else if stdenv.system == "armv7l-linux"
else if stdenv.hostPlatform.system == "armv7l-linux"
then "armv7-unknown-linux-gnueabihf"
else if stdenv.system == "aarch64-linux"
else if stdenv.hostPlatform.system == "aarch64-linux"
then "aarch64-unknown-linux-gnu"
else if stdenv.system == "i686-darwin"
else if stdenv.hostPlatform.system == "i686-darwin"
then "i686-apple-darwin"
else if stdenv.system == "x86_64-darwin"
else if stdenv.hostPlatform.system == "x86_64-darwin"
then "x86_64-apple-darwin"
else throw "missing bootstrap url for platform ${stdenv.system}";
else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}";
src = fetchurl {
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";

View File

@@ -39,9 +39,9 @@ let
sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
};
};
cfg = options.${stdenv.system};
cfg = options.${stdenv.hostPlatform.system};
in
assert builtins.hasAttr stdenv.system options;
assert builtins.hasAttr stdenv.hostPlatform.system options;
stdenv.mkDerivation rec {
name = "sbcl-bootstrap-${version}";
version = cfg.version;

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchurl, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.system)
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
# to get rid of ${glibc} dependency.