Commit graph

269 commits

Author SHA1 Message Date
Hadi 8ca4470a5e androidenv: use unzip in nativeBuildInputs 2023-01-03 18:17:11 -05:00
Hadi 2f06edee4f
Update pkgs/development/mobile/androidenv/deploy-androidpackages.nix
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-01-03 11:05:57 -05:00
Hadi d1a1f2fa06 androidenv: Fix we are using 2 spaces to intend nix code in
see: https://github.com/NixOS/nixpkgs/pull/208137#discussion_r1059518929
2022-12-31 12:21:21 -05:00
Hadi bceccb7f70 androidenv: Replace deploy-androidpackage.nix with deploy-androidpackages.nix 2022-12-31 11:21:40 -05:00
Artturi 338097c04c
Merge pull request #208300 from hadilq/androidenv/fix-system-image-download-url-for-default-type 2022-12-30 15:48:07 +02:00
Hadi 6fd11aec99 androidenv: Fix system image download url for default type 2022-12-30 15:30:27 +02:00
Hadi 2f688374e0
androidenv: fix missing packages in repo json (#208137) 2022-12-30 15:28:12 +02:00
jakobkukla 14c7a30161 androidenv: fix missing inherit os 2022-12-20 04:28:20 +01:00
jakobkukla 8851f074f8 androidenv: fix non-existent emulatorVersion 2022-12-20 04:28:20 +01:00
Vanilla 32c1e7d7db
androidenv: fix missing inherit os in build-tools 2022-12-17 13:21:54 +08:00
Artturi f9b2c36a7f
Merge pull request #205701 from Artturin/deprecatereplacechars
lib.replaceChars: warn about being a deprecated alias
2022-12-15 23:46:51 +02:00
Artturin 05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
Artturin a2f85e0fa8 androidenv: use callPackage instead of import & fix infinite recursion
infinite recursion was due to autoPatchelfHook being in buildInputs of
platform-tools, i will add a lint for it in nix-community/nixpkgs-lint.

```
$ nix build ".#pkgsCross.aarch64-android-prebuilt.hello" --show-trace 2>&1 | rg 'while evaluating the attr.+deriv'
    … while evaluating the attribute 'stdenv' of the derivation 'zlib-aarch64-unknown-linux-android-1.2.13'
    … while evaluating the attribute 'CPPFLAGS' of the derivation 'python3-aarch64-unknown-linux-android-3.10.8'
    … while evaluating the attribute 'setuptools' of the derivation 'python-catch-conflicts-hook'
    … while evaluating the attribute 'nativeBuildInputs' of the derivation 'python3.10-pyelftools-0.28'
    … while evaluating the attribute 'passAsFile' of the derivation 'python3-3.10.8-env'
    … while evaluating the attribute 'pythonInterpreter' of the derivation 'auto-patchelf-hook'
    … while evaluating the attribute 'buildInputs' of the derivation 'platform-tools-33.0.2'
    … while evaluating the attribute 'installPhase' of the derivation 'ndk-24.0.8215888'
    … while evaluating the attribute 'installPhase' of the derivation 'aarch64-unknown-linux-android-ndk-toolchain-24.0.8215888'
    … while evaluating the attribute 'bintools_bin' of the derivation 'aarch64-unknown-linux-android-ndk-toolchain-wrapper-24.0.8215888'
    … while evaluating the attribute 'bintools' of the derivation 'aarch64-unknown-linux-android-ndk-toolchain-wrapper-24.0.8215888'
    … while evaluating the attribute 'defaultNativeBuildInputs' of the derivation 'stdenv-linux'
    … while evaluating the attribute 'stdenv' of the derivation 'hello-aarch64-unknown-linux-android-2.12.1'
```

stdenv -> stdenv.cc -> bintools -> android-ndk-toolchain -> ndk -> platform-tools -> auto-patchelf-hook -> python3 -> zlib -> stdenv -> stdenv.cc -> ...

autoPatchelfHook was in buildInputs of platform-tools so we needed the host tools to build
it but platform-tools was a required tool
2022-12-15 21:55:22 +02:00
Léo Gaspard ad25aa1098
androidenv: use emulator from the path that makes it find qemu (#202088) 2022-12-06 21:16:49 +01:00
Sheldon Neuberger a5f4369130 androidenv: fix darwin ndk symlink
Today the nix ndk package on darwin points to a directory that doesn't
exist. This fix was added previously for linux but is needed on all
platforms.
2022-10-27 10:12:54 -07:00
Artturin 7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Artturi 79c42aa06c
Merge pull request #186564 from Artturin/crossevalfixes
Fixes for cross-compilation
2022-08-27 17:49:00 +03:00
Artturin c6568adb00 treewide: makeWrapper buildInputs to nativeBuildInputs
most found with https://github.com/siraben/nix-lint
2022-08-16 13:14:19 +03:00
Charlotte Van Petegem 8cf6dd815f
androidenv: fix build of build-tools >= 33
mainDexClasses seems to have been removed in this version of build-tools. (Seems
to, because the release notes are not updated at all, unfortunately:
https://developer.android.com/studio/releases/build-tools).
2022-08-16 09:37:44 +02:00
Van Tuan Vo 8b8ac80759
androidenv: fix default ndk linking for ndk > 22 2022-07-24 20:35:49 +02:00
Van Tuan Vo e8dfc2d72a
androidenv: fix ndk linking for ndk < 23 2022-07-24 20:35:48 +02:00
Jari Vetoniemi 2408ef3c6f androidndk: remove legacy ndks
allows us to remove python2 dependencies and lot more
2022-06-29 18:27:16 +09:00
Jari Vetoniemi 0aded46f08 androidenv: update packages 2022-06-29 18:27:16 +09:00
Jari Vetoniemi 5f1923d67e androidenv: fix android cross-compilers
These were completely broken. Even if they managed to output a binary,
it wouldn't actually run on the actual device.
2022-06-29 18:27:16 +09:00
Manuel Bärenz 0856383b26 androidenv: Fix emulator 2022-06-20 14:30:31 +02:00
Sandro Jäckel 2d1147930b
android tools: fix meta license 2022-06-20 11:26:44 +02:00
Sandro 1fdeb86121
Merge pull request #169468 from Atemu/update/android-env
androidenv: regenerate repo.json
2022-05-31 15:38:21 +02:00
Jakub Sokołowski b0663a3dc3
androidenv: include autoPatchelfHook only on Linux
This is supposed to fix an issue caused by this PR:
https://github.com/NixOS/nixpkgs/pull/163924

Which made `autoPatchelfHook` available only on Linux, resulting in
builds of Android packages failing with:
```
error: Package ‘auto-patchelf-hook’ in /nix/store/...-nixpkgs-source/pkgs/build-support/trivial-builders.nix:73
    is not supported on ‘x86_64-darwin’, refusing to evaluate.
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-29 23:17:37 +02:00
Artturin c1fffdfffb treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
Artturin 0c4d65b21e treewide: stdenv.glibc -> glibc 2022-05-25 15:51:20 +03:00
Atemu 1df306132b platform-tools: allow aarch64-darwin 2022-04-20 20:43:45 +02:00
Atemu 928d976aa5 androidenv: regenerate repo.json 2022-04-20 20:33:12 +02:00
Atemu e48ca2fa56 androidenv: document update procedure 2022-04-20 20:26:59 +02:00
OPNA2608 d2f268745a treewide: autoPatchelfHook only on Linux 2022-03-23 21:37:39 +01:00
Michael Lohmann 962d74ce84
androidenv: default emulatorVersion to one available
The last repo.json update in a0f6a8af81 removed the default emulator version, so it had to be changed (or the repo.json had to be overwritten) for it to work.
Instead use the most recent available emulator version
2021-12-10 20:43:45 +01:00
Ryan Burns 15111f8a9a ndk-bundle: fix build
Since b79483d2b7,
the various architectures of the prebuilt libraries cause
errors, so we need to tell patchelf to ignore missing deps.
2021-11-19 23:37:11 -08:00
flexagoon 2ec2ad064b androidenv: fix emulator build on Linux 2021-11-18 20:02:45 +03:00
Sandro Jäckel 8547db919a
treewide: switch `builtins.fromJSON(builtins.readFile ./file.json)` to lib.importJSON ./file.json 2021-11-03 14:43:52 +01:00
Alyssa Ross c9ce275aa4
treewide: "does not exists" -> "does not exist"
I noticed this minor grammar mistake when running update.nix, and then
while grepping to find the source I noticed we had it a few times in
Nixpkgs.  Just as easy to fix treewide as it was to fix the one
occurrence I noticed.
2021-09-09 18:45:33 +00:00
Charlotte Van Petegem a0f6a8af81
androidenv: regenerate repo.json 2021-08-21 12:20:50 +02:00
Pavol Rusnak 68889ed61f
treewide: use quotes for url 2021-06-20 16:26:23 +02:00
AndersonTorres e9e5f5f84d Change all alsaLib references to alsa-lib 2021-06-10 01:12:49 -03:00
Jonas Chevalier c6b62f2381
mkShell: introduce packages argument (#122180)
The distinction between the inputs doesn't really make sense in the
mkShell context.  Technically speaking, we should be using the
nativeBuildInputs most of the time.

So in order to make this function more beginner-friendly, add "packages"
as an attribute, that maps to nativeBuildInputs.

This commit also updates all the uses in nixpkgs.
2021-05-13 19:17:29 +02:00
Morgan Jones a7e5b070be androidenv: Allow multiple ndkVersions to be specified
Android is deprecating ndk.dir in favor of specifying exact NDK
version in Gradle configuration. Ensure that we can support multiple
NDKs, and link them into the location the Android Gradle Plugin expects.
2021-04-24 15:56:08 -06:00
Sandro 151d746ab5
Merge pull request #115229 from rolfschr/android-fix-shebang-in-make-standalone-toolchain 2021-03-30 16:59:38 +02:00
Rolf Schröder c03f846b46 android: replace '$(pwd)' by '.' 2021-03-27 12:46:58 +01:00
Samuel Gräfenstein 6b6d2abfa0
treewide: xlibs -> xorg
Fix building with `config.allowAliases = false;`.
2021-03-17 00:00:18 +01:00
Rolf Schröder 2985284ccb android: Fix shebangs in auto-generated android toolchain scripts
The script make_standalone_toolchain.py autogenerates some shell scripts
when invoked. These scripts have a hardcoded shebang of '#!/bin/bash'.
The generated scripts obviously do not work in a Nix environment. This
commit makes sure the scripts have the correct shebang.
2021-03-09 21:13:28 +01:00
s1341 aee60bef7a android_prebuilt: Fix eval 2021-03-04 18:17:39 +00:00
Ryan Burns b98bfb6536 androidenv: do not copy verbosely
Verbose copying can exceed hydra's output limit,
causing spurious failures. For example, see:
https://hydra.nixos.org/eval/1644892?filter=android
2021-01-27 02:03:14 -08:00