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

@@ -10,10 +10,10 @@ stdenv.mkDerivation rec {
name = "android-ndk-r${version}";
inherit version;
src = if stdenv.system == "x86_64-linux" then fetchurl {
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "https://dl.google.com/android/repository/${name}-linux-x86_64.zip";
inherit sha256;
} else throw "platform ${stdenv.system} not supported!";
} else throw "platform ${stdenv.hostPlatform.system} not supported!";
phases = "buildPhase";

View File

@@ -9,16 +9,16 @@
stdenv.mkDerivation rec {
name = "android-ndk-r8e";
src = if stdenv.system == "i686-linux"
src = if stdenv.hostPlatform.system == "i686-linux"
then fetchurl {
url = "http://dl.google.com/android/ndk/${name}-linux-x86.tar.bz2";
sha256 = "c2c4e0c8b3037149a0f5dbb08d72f814a52af4da9fff9d80328c675457e95a98";
}
else if stdenv.system == "x86_64-linux" then fetchurl {
else if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
url = "http://dl.google.com/android/ndk/${name}-linux-x86_64.tar.bz2";
sha256 = "093gf55zbh38p2gk5bdykj1vg9p5l774wjdzw5mhk4144jm1wdq7";
}
else throw "platform ${stdenv.system} not supported!";
else throw "platform ${stdenv.hostPlatform.system} not supported!";
phases = "buildPhase";

View File

@@ -22,16 +22,16 @@ stdenv.mkDerivation rec {
name = "android-sdk-${version}";
version = "25.2.5";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
then fetchurl {
url = "https://dl.google.com/android/repository/tools_r${version}-linux.zip";
sha256 = "0gnk49pkwy4m0nqwm1xnf3w4mfpi9w0kk7841xlawpwbkj0icxap";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip";
sha256 = "0yg7wjmyw70xsh8k4hgbqb5rilam2a94yc8dwbh7fjwqcmpxgwqb";
}
else throw "platform not ${stdenv.system} supported!";
else throw "platform not ${stdenv.hostPlatform.system} supported!";
buildCommand = ''
mkdir -p $out/libexec
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
done
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
''
# There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
@@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i
done
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs}
do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
done
''}
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
# We must also patch the 64-bit emulator instances, if needed
for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-*
@@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
# The emulators need additional libraries, which are dynamically loaded => let's wrap them
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service
do
wrapProgram `pwd`/$i \
@@ -102,7 +102,7 @@ stdenv.mkDerivation rec {
patchShebangs .
${if stdenv.system == "i686-linux" then
${if stdenv.hostPlatform.system == "i686-linux" then
''
# The monitor requires some more patching
@@ -115,7 +115,7 @@ stdenv.mkDerivation rec {
cd ../..
''
else if stdenv.system == "x86_64-linux" then
else if stdenv.hostPlatform.system == "x86_64-linux" then
''
# The monitor requires some more patching

View File

@@ -3,16 +3,16 @@
stdenv.mkDerivation rec {
version = "26.0.2";
name = "android-build-tools-r${version}";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
then fetchurl {
url = "https://dl.google.com/android/repository/build-tools_r${version}-linux.zip";
sha256 = "1kii880bwhjkc343zwx1ysxyisxhczrwhphnxbwsgi45mjgq8lm7";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = "https://dl.google.com/android/repository/build-tools_r${version}-macosx.zip";
sha256 = "1x0ycprl6hgsm23kck5ind7x00hzydc5k3h3ch4a13407xbpvzvx";
}
else throw "System ${stdenv.system} not supported!";
else throw "System ${stdenv.hostPlatform.system} not supported!";
buildCommand = ''
mkdir -p $out/build-tools
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
unzip $src
mv android-* ${version}
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
''
cd ${version}

View File

@@ -25,15 +25,15 @@ rec {
inherit (pkgs) stdenv fetchurl unzip;
};
platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux")
platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux")
then import ./platforms-linux.nix {
inherit (pkgs) stdenv fetchurl unzip;
}
else if pkgs.stdenv.system == "x86_64-darwin"
else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin"
then import ./platforms-macosx.nix {
inherit (pkgs) stdenv fetchurl unzip;
}
else throw "Platform: ${pkgs.stdenv.system} not supported!";
else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!";
sysimages = import ./sysimages.nix {
inherit (pkgs) stdenv fetchurl unzip;

View File

@@ -8,16 +8,16 @@ in
stdenv.mkDerivation rec {
version = "26.0.2";
name = "android-platform-tools-r${version}";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
then fetchurl {
url = "https://dl.google.com/android/repository/platform-tools_r${version}-linux.zip";
sha256 = "0695npvxljbbh8xwfm65k34fcpyfkzvfkssgnp46wkmnq8w5mcb3";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl {
url = "https://dl.google.com/android/repository/platform-tools_r${version}-darwin.zip";
sha256 = "0gy7apw9pmnnm41z6ywglw5va4ghmny4j57778may4q7ar751l56";
}
else throw "System ${stdenv.system} not supported!";
else throw "System ${stdenv.hostPlatform.system} not supported!";
buildCommand = ''
mkdir -p $out
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
unzip $src
cd platform-tools
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux")
''
for i in adb dmtracedump fastboot hprof-conv sqlite3
do