markoburcul 8771c4d8c9
nix: create nix flake and libwaku-android-arm64 target
* android-ndk is added
* in the derivation, system nim is default but one can change it to
  nimbus-build-system
* special script for creating nimble links, necessary for the
  compilation to succeed.

Referenced issue:
* https://github.com/waku-org/nwaku/issues/3232
2025-04-10 17:35:31 +02:00

18 lines
530 B
Nix

{ stdenv, compose }:
#
# This derivation simply symlinks some stuff to get
# shorter paths as libexec/android-sdk is quite the mouthful.
# With this you can just do `androidPkgs.sdk` and `androidPkgs.ndk`.
#
stdenv.mkDerivation {
name = "${compose.androidsdk.name}-mod";
phases = [ "symlinkPhase" ];
outputs = [ "out" "sdk" "ndk" ];
symlinkPhase = ''
ln -s ${compose.androidsdk} $out
ln -s ${compose.androidsdk}/libexec/android-sdk $sdk
ln -s ${compose.androidsdk}/libexec/android-sdk/ndk-bundle $ndk
'';
}