From d9155904b347679163c6fe6702f8ec6384bd8c40 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 24 Jun 2018 16:42:10 -0400 Subject: 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 --- pkgs/development/mobile/androidenv/androidndk.nix | 6 ++++++ pkgs/development/mobile/androidenv/androidndk_r8e.nix | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'pkgs/development/mobile') diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix index 150d8d758699..1e8ea65c73d9 100644 --- a/pkgs/development/mobile/androidenv/androidndk.nix +++ b/pkgs/development/mobile/androidenv/androidndk.nix @@ -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 \) \ diff --git a/pkgs/development/mobile/androidenv/androidndk_r8e.nix b/pkgs/development/mobile/androidenv/androidndk_r8e.nix index 44fa961b992f..3c12e16277d9 100644 --- a/pkgs/development/mobile/androidenv/androidndk_r8e.nix +++ b/pkgs/development/mobile/androidenv/androidndk_r8e.nix @@ -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 \) \ -- cgit 1.4.1