diff --git a/pkgs/development/mobile/androidenv/cmake.nix b/pkgs/development/mobile/androidenv/cmake.nix index a284457a7de6..3abad6b41f62 100644 --- a/pkgs/development/mobile/androidenv/cmake.nix +++ b/pkgs/development/mobile/androidenv/cmake.nix @@ -1,8 +1,8 @@ -{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}: +{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs, stdenv}: deployAndroidPackage { inherit package os; - nativeBuildInputs = [ autoPatchelfHook ]; + nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ]; buildInputs = lib.optional (os == "linux") [ pkgs.stdenv.cc.libc pkgs.stdenv.cc.cc pkgs.ncurses5 ]; patchInstructions = lib.optionalString (os == "linux") '' autoPatchelf $packageBaseDir/bin diff --git a/pkgs/development/mobile/androidenv/compose-android-packages.nix b/pkgs/development/mobile/androidenv/compose-android-packages.nix index ed4cb4d527b1..57f305015ce1 100644 --- a/pkgs/development/mobile/androidenv/compose-android-packages.nix +++ b/pkgs/development/mobile/androidenv/compose-android-packages.nix @@ -171,7 +171,7 @@ rec { cmake = map (version: import ./cmake.nix { - inherit deployAndroidPackage os autoPatchelfHook pkgs lib; + inherit deployAndroidPackage os autoPatchelfHook pkgs lib stdenv; package = packages.cmake.${version}; } ) cmakeVersions; @@ -179,7 +179,7 @@ rec { # Creates a NDK bundle. makeNdkBundle = ndkVersion: import ./ndk-bundle { - inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs pkgsHostHost lib platform-tools; + inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs pkgsHostHost lib platform-tools stdenv; package = packages.ndk-bundle.${ndkVersion}; }; diff --git a/pkgs/development/mobile/androidenv/emulator.nix b/pkgs/development/mobile/androidenv/emulator.nix index eec99498a160..41a2dd709137 100644 --- a/pkgs/development/mobile/androidenv/emulator.nix +++ b/pkgs/development/mobile/androidenv/emulator.nix @@ -2,33 +2,35 @@ deployAndroidPackage { inherit package os; - buildInputs = [ autoPatchelfHook makeWrapper ] - ++ lib.optionals (os == "linux") [ - pkgs.glibc - pkgs.xorg.libX11 - pkgs.xorg.libXext - pkgs.xorg.libXdamage - pkgs.xorg.libXfixes - pkgs.xorg.libxcb - pkgs.xorg.libXcomposite - pkgs.xorg.libXcursor - pkgs.xorg.libXi - pkgs.xorg.libXrender - pkgs.xorg.libXtst - pkgs.libcxx - pkgs.libGL - pkgs.libpulseaudio - pkgs.libuuid - pkgs.zlib - pkgs.ncurses5 - pkgs.stdenv.cc.cc - pkgs_i686.glibc - pkgs.expat - pkgs.freetype - pkgs.nss - pkgs.nspr - pkgs.alsa-lib - ]; + buildInputs = [ makeWrapper ] + ++ lib.optionals (os == "linux") (with pkgs; [ + autoPatchelfHook + glibc + libcxx + libGL + libpulseaudio + libuuid + zlib + ncurses5 + stdenv.cc.cc + i686.glibc + expat + freetype + nss + nspr + alsa-lib + ]) ++ (with pkgs.xorg; [ + libX11 + libXext + libXdamage + libXfixes + libxcb + libXcomposite + libXcursor + libXi + libXrender + libXtst + ]); patchInstructions = lib.optionalString (os == "linux") '' addAutoPatchelfSearchPath $packageBaseDir/lib addAutoPatchelfSearchPath $packageBaseDir/lib64 diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix index a854069e75a5..58cc8f9d5709 100644 --- a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix +++ b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, pkgsHostHost, makeWrapper, autoPatchelfHook +{ stdenv, lib, pkgs, pkgsHostHost, makeWrapper, autoPatchelfHook , deployAndroidPackage, package, os, platform-tools }: @@ -9,7 +9,8 @@ let in deployAndroidPackage { inherit package os; - nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + nativeBuildInputs = [ makeWrapper ] + ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; autoPatchelfIgnoreMissingDeps = true; buildInputs = lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.python2 pkgs.ncurses5 pkgs.zlib pkgs.libcxx.out pkgs.libxml2 ]; patchInstructions = lib.optionalString (os == "linux") ('' diff --git a/pkgs/development/mobile/androidenv/tools/26.nix b/pkgs/development/mobile/androidenv/tools/26.nix index a768a120547f..7a8f4cd660f1 100644 --- a/pkgs/development/mobile/androidenv/tools/26.nix +++ b/pkgs/development/mobile/androidenv/tools/26.nix @@ -3,8 +3,12 @@ deployAndroidPackage { name = "androidsdk"; inherit os package; - buildInputs = [ autoPatchelfHook makeWrapper ] - ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.xorg.libX11 pkgs.xorg.libXrender pkgs.xorg.libXext pkgs.fontconfig pkgs.freetype pkgs_i686.glibc pkgs_i686.xorg.libX11 pkgs_i686.xorg.libXrender pkgs_i686.xorg.libXext pkgs_i686.fontconfig.lib pkgs_i686.freetype pkgs_i686.zlib pkgs.fontconfig.lib ]; + buildInputs = [ makeWrapper ] + ++ lib.optional (os == "linux") ( + (with pkgs; [ autoPatchelfHook glibc freetype fontconfig fontconfig.lib]) + ++ (with pkgs.xorg; [ libX11 libXrender libXext ]) + ++ (with pkgs_i686; [ glibc xorg.libX11 xorg.libXrender xorg.libXext fontconfig.lib freetype zlib ]) + ); patchInstructions = '' ${lib.optionalString (os == "linux") ''