diff options
author | Siarhei Zirukin <ftrvxmtrx@gmail.com> | 2014-09-25 11:59:16 +0200 |
---|---|---|
committer | Siarhei Zirukin <ftrvxmtrx@gmail.com> | 2014-09-25 11:59:16 +0200 |
commit | ec1118cbb93268c807dfee24b51b0f77667b176a (patch) | |
tree | 75e59799e23de2ada426daa3bd3186c28391e6c9 /pkgs/development | |
parent | 711d67263a470875e2d221c68d0df40529b72eb4 (diff) | |
download | nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.tar nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.tar.gz nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.tar.bz2 nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.tar.lz nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.tar.xz nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.tar.zst nixlib-ec1118cbb93268c807dfee24b51b0f77667b176a.zip |
androidndk: fix make-standalone-toolchain.sh helper script
The script does a copy of a toolchain and then rearranges files a bit. The problem is that these files have the same permissions (read-only) as installed ones. The patch fixes the problem by changing permissions of the copy before doing anything else.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/mobile/androidenv/androidndk.nix | 4 | ||||
-rw-r--r-- | pkgs/development/mobile/androidenv/make-standalone-toolchain.patch | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix index cbcff8178e32..2b3bb3339481 100644 --- a/pkgs/development/mobile/androidenv/androidndk.nix +++ b/pkgs/development/mobile/androidenv/androidndk.nix @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { mkdir -pv $out tar xf $src mv */* $out + + # so that it doesn't fail because of read-only permissions set + patch -p1 -d $out < ${ ./make-standalone-toolchain.patch } + find $out \( \ \( -type f -a -name "*.so*" \) -o \ \( -type f -a -perm +0100 \) \ diff --git a/pkgs/development/mobile/androidenv/make-standalone-toolchain.patch b/pkgs/development/mobile/androidenv/make-standalone-toolchain.patch new file mode 100644 index 000000000000..afc3470aaba1 --- /dev/null +++ b/pkgs/development/mobile/androidenv/make-standalone-toolchain.patch @@ -0,0 +1,13 @@ +diff -ru android-ndk-r9d.old/build/tools/make-standalone-toolchain.sh android-ndk-r9d/build/tools/make-standalone-toolchain.sh +--- android-ndk-r9d.old/build/tools/make-standalone-toolchain.sh 2014-09-25 11:42:09.990500975 +0200 ++++ android-ndk-r9d/build/tools/make-standalone-toolchain.sh 2014-09-25 11:43:06.097501636 +0200 +@@ -252,6 +252,9 @@ + # Now copy the GCC toolchain prebuilt binaries + run copy_directory "$TOOLCHAIN_PATH" "$TMPDIR" + ++# Making it writable again ++chmod -R +w "$TMPDIR" ++ + # Replace soft-link mcld by real file + ALL_LDS=`find $TMPDIR -name "*mcld"` + for LD in $ALL_LDS; do |