mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
45 lines
776 B
Nix
45 lines
776 B
Nix
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
let fhs = pkgs.buildFHSUserEnv {
|
|
name = "android-env";
|
|
targetPkgs = pkgs: with pkgs;
|
|
[ git
|
|
gitRepo
|
|
gnupg
|
|
python2
|
|
curl
|
|
procps
|
|
openssl
|
|
gnumake
|
|
nettools
|
|
androidenv.platformTools
|
|
jdk
|
|
schedtool
|
|
utillinux
|
|
m4
|
|
gperf
|
|
perl
|
|
libxml2
|
|
zip
|
|
unzip
|
|
bison
|
|
flex
|
|
lzop
|
|
file
|
|
gnumake
|
|
];
|
|
multiPkgs = pkgs: with pkgs;
|
|
[ zlib
|
|
];
|
|
runScript = "bash";
|
|
profile = ''
|
|
export USE_CCACHE=1
|
|
export ANDROID_JAVA_HOME=${pkgs.jdk.home}
|
|
export JAVA_HOME=${pkgs.jdk.home}
|
|
'';
|
|
};
|
|
in pkgs.stdenv.mkDerivation {
|
|
name = "android-env-shell";
|
|
nativeBuildInputs = [ fhs ];
|
|
shellHook = "exec android-env";
|
|
}
|