summary refs log tree commit diff
path: root/pkgs/development/mobile/androidenv
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-20 15:11:29 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-08-30 17:20:32 -0400
commit2c2f1e37d4374ea61caefd9389927ea03df4ce31 (patch)
tree1c0dff3f6483825a9143741bdddca44f35bb4224 /pkgs/development/mobile/androidenv
parent94f71d800db2ef7afb9fc8dad9e9aa503bfa2941 (diff)
downloadnixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar
nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.gz
nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.bz2
nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.lz
nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.xz
nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.tar.zst
nixpkgs-2c2f1e37d4374ea61caefd9389927ea03df4ce31.zip
reewide: Purge all uses `stdenv.system` and top-level `system`
It is deprecated and will be removed after 18.09.
Diffstat (limited to 'pkgs/development/mobile/androidenv')
-rw-r--r--pkgs/development/mobile/androidenv/androidndk.nix4
-rw-r--r--pkgs/development/mobile/androidenv/androidndk_r8e.nix6
-rw-r--r--pkgs/development/mobile/androidenv/androidsdk.nix18
-rw-r--r--pkgs/development/mobile/androidenv/build-tools.nix8
-rw-r--r--pkgs/development/mobile/androidenv/default.nix6
-rw-r--r--pkgs/development/mobile/androidenv/platform-tools.nix8
6 files changed, 25 insertions, 25 deletions
diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix
index 972c8a5dfbc..3ccdb237f89 100644
--- a/pkgs/development/mobile/androidenv/androidndk.nix
+++ b/pkgs/development/mobile/androidenv/androidndk.nix
@@ -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";
 
diff --git a/pkgs/development/mobile/androidenv/androidndk_r8e.nix b/pkgs/development/mobile/androidenv/androidndk_r8e.nix
index 3c12e16277d..68d2150f972 100644
--- a/pkgs/development/mobile/androidenv/androidndk_r8e.nix
+++ b/pkgs/development/mobile/androidenv/androidndk_r8e.nix
@@ -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";
 
diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix
index 503e4f5c889..5f61f25d54e 100644
--- a/pkgs/development/mobile/androidenv/androidsdk.nix
+++ b/pkgs/development/mobile/androidenv/androidsdk.nix
@@ -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
 
diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix
index 457a9b6720a..85e604bd3f4 100644
--- a/pkgs/development/mobile/androidenv/build-tools.nix
+++ b/pkgs/development/mobile/androidenv/build-tools.nix
@@ -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}
 
diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix
index 7d7c92cd0f5..4e9f139b95e 100644
--- a/pkgs/development/mobile/androidenv/default.nix
+++ b/pkgs/development/mobile/androidenv/default.nix
@@ -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;
diff --git a/pkgs/development/mobile/androidenv/platform-tools.nix b/pkgs/development/mobile/androidenv/platform-tools.nix
index f5e57994284..22b5cd81f87 100644
--- a/pkgs/development/mobile/androidenv/platform-tools.nix
+++ b/pkgs/development/mobile/androidenv/platform-tools.nix
@@ -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