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
This commit is contained in:
parent
7652b2ef16
commit
d9155904b3
@ -1,6 +1,9 @@
|
||||
{ stdenv, fetchurl, zlib, ncurses5, unzip, lib, makeWrapper
|
||||
, coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
|
||||
, platformTools, python3, libcxx, version, sha256
|
||||
, fullNDK ? false # set to true if you want other parts of the NDK
|
||||
# that is not used by Nixpkgs like sources,
|
||||
# examples, docs, or LLVM toolchains
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -55,11 +58,14 @@ stdenv.mkDerivation rec {
|
||||
}
|
||||
cd ${pkg_path}
|
||||
|
||||
'' + lib.optionalString (!fullNDK) ''
|
||||
# Steps to reduce output size
|
||||
rm -rf docs sources tests
|
||||
# We only support cross compiling with gcc for now
|
||||
rm -rf toolchains/*-clang* toolchains/llvm*
|
||||
'' +
|
||||
|
||||
''
|
||||
find ${pkg_path}/toolchains \( \
|
||||
\( -type f -a -name "*.so*" \) -o \
|
||||
\( -type f -a -perm -0100 \) \
|
||||
|
@ -1,6 +1,9 @@
|
||||
{ stdenv, fetchurl, zlib, ncurses, lib, makeWrapper
|
||||
, coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which
|
||||
, platformTools
|
||||
, fullNDK ? false # set to true if you want other parts of the NDK
|
||||
# that is not used by Nixpkgs like sources,
|
||||
# examples, docs, or LLVM toolchains
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -49,11 +52,13 @@ stdenv.mkDerivation rec {
|
||||
-d $out/libexec/${name} < ${ ./make-standalone-toolchain_r8e.patch }
|
||||
cd ${pkg_path}
|
||||
|
||||
'' + lib.optionalString (!fullNDK) ''
|
||||
# Steps to reduce output size
|
||||
rm -rf docs sources tests
|
||||
# We only support cross compiling with gcc for now
|
||||
rm -rf toolchains/*-clang* toolchains/llvm-*
|
||||
|
||||
'' + ''
|
||||
find ${pkg_path}/toolchains \( \
|
||||
\( -type f -a -name "*.so*" \) -o \
|
||||
\( -type f -a -perm -0100 \) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user