shell.nix (955B)
1 { pkgs ? import <nixpkgs> {} }: 2 with pkgs; 3 let 4 x11libs = lib.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi libglvnd vulkan-loader vulkan-validation-layers ]; 5 ndk-version = "24.0.8215888"; 6 androidComposition = androidenv.composeAndroidPackages { 7 includeNDK = true; 8 ndkVersions = [ ndk-version ]; 9 platformVersions = [ "28" "29" "30" ]; 10 useGoogleAPIs = false; 11 #useGoogleTVAddOns = false; 12 #includeExtras = [ 13 # "extras;google;gcm" 14 #]; 15 }; 16 androidsdk = androidComposition.androidsdk; 17 android-home = "${androidsdk}/libexec/android-sdk"; 18 ndk-home = "${android-home}/ndk/${ndk-version}"; 19 in 20 21 mkShell { 22 nativeBuildInputs = [ 23 cargo-udeps cargo-edit cargo-watch rustup rustfmt libiconv pkgconfig cmake fontconfig 24 brotli wabt 25 26 heaptrack 27 28 # android 29 jre openssl libiconv androidsdk 30 ]; 31 32 ANDROID_HOME = android-home; 33 NDK_HOME = ndk-home; 34 LD_LIBRARY_PATH="${x11libs}"; 35 }