From f5c2960a1136326a8d24720aca17683b28077ee2 Mon Sep 17 00:00:00 2001 From: Nick Novitski Date: Wed, 24 Oct 2018 20:36:33 -0700 Subject: [PATCH] androidenv.buildTools: patch hard-coded /bin/ls paths --- pkgs/development/mobile/androidenv/build-tools.nix | 9 +++++++-- pkgs/development/mobile/androidenv/default.nix | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix index a607ed31900e..f0b9a77d3f19 100644 --- a/pkgs/development/mobile/androidenv/build-tools.nix +++ b/pkgs/development/mobile/androidenv/build-tools.nix @@ -1,4 +1,4 @@ -{stdenv, stdenv_32bit, fetchurl, unzip, zlib_32bit, ncurses_32bit, file, zlib, ncurses}: +{stdenv, stdenv_32bit, fetchurl, unzip, zlib_32bit, ncurses_32bit, file, zlib, ncurses, coreutils}: stdenv.mkDerivation rec { version = "28.0.3"; @@ -20,9 +20,14 @@ stdenv.mkDerivation rec { unzip $src mv android-* ${version} + cd ${version} + + for f in $(grep -Rl /bin/ls .); do + sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f" + done + ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") '' - cd ${version} ln -s ${ncurses.out}/lib/libncurses.so.5 `pwd`/lib64/libtinfo.so.5 diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index bd369200bd5f..0291986b5a4a 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -10,7 +10,7 @@ rec { }; buildTools = import ./build-tools.nix { - inherit (pkgs) stdenv fetchurl unzip zlib file; + inherit (pkgs) stdenv fetchurl unzip zlib file coreutils; stdenv_32bit = pkgs_i686.stdenv; zlib_32bit = pkgs_i686.zlib; ncurses_32bit = pkgs_i686.ncurses5;