git.iko.soy/typeable/nixpkgs
on master help sign in
androidndk: add fullNDK option

Setting this to true will disable removing some of the unused parts of the NDK toolchain that is unused in Nixpkgs but may be used by others. /cc @bkchr

commitd9155904b347679163c6fe6702f8ec6384bd8c40 authorMatthew Bauer <mjbauer95@gmail.com> dateSun 24 Jun 2018, 16:42 (8 years ago) parent7652b2e
2 files changed+11
pkgs/development/mobile/androidenv/androidndk.nix+6 pkgs/development/mobile/androidenv/androidndk_r8e.nix+5
pkgs/development/mobile/androidenv/androidndk.nix+6
@@ -1,6 +1,9 @@
11{ stdenv, fetchurl, zlib, ncurses5, unzip, lib, makeWrapper
22, coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
33, platformTools, python3, libcxx, version, sha256
4+, fullNDK ? false # set to true if you want other parts of the NDK
5+ # that is not used by Nixpkgs like sources,
6+ # examples, docs, or LLVM toolchains
47}:
58
69stdenv.mkDerivation rec {
@@ -55,11 +58,14 @@ stdenv.mkDerivation rec {
5558 }
5659 cd ${pkg_path}
5760
61+ '' + lib.optionalString (!fullNDK) ''
5862 # Steps to reduce output size
5963 rm -rf docs sources tests
6064 # We only support cross compiling with gcc for now
6165 rm -rf toolchains/*-clang* toolchains/llvm*
66+ '' +
6267
68+ ''
6369 find ${pkg_path}/toolchains \( \
6470 \( -type f -a -name "*.so*" \) -o \
6571 \( -type f -a -perm -0100 \) \
pkgs/development/mobile/androidenv/androidndk_r8e.nix+5
@@ -1,6 +1,9 @@
11{ stdenv, fetchurl, zlib, ncurses, lib, makeWrapper
22, coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
33, platformTools
4+, fullNDK ? false # set to true if you want other parts of the NDK
5+ # that is not used by Nixpkgs like sources,
6+ # examples, docs, or LLVM toolchains
47}:
58
69stdenv.mkDerivation rec {
@@ -49,11 +52,13 @@ stdenv.mkDerivation rec {
4952 -d $out/libexec/${name} < ${ ./make-standalone-toolchain_r8e.patch }
5053 cd ${pkg_path}
5154
55+ '' + lib.optionalString (!fullNDK) ''
5256 # Steps to reduce output size
5357 rm -rf docs sources tests
5458 # We only support cross compiling with gcc for now
5559 rm -rf toolchains/*-clang* toolchains/llvm-*
5660
61+ '' + ''
5762 find ${pkg_path}/toolchains \( \
5863 \( -type f -a -name "*.so*" \) -o \
5964 \( -type f -a -perm -0100 \) \