Files
builders_rubenslte/shell.nix
T
2026-09-13 19:56:31 +02:00

58 lines
1.1 KiB
Nix

let
pkgs = import (fetchTarball {
# An older nixpkgs version is required for old GCC and C++
# libraries.
url = "https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz";
}) {};
fhs = pkgs.buildFHSUserEnv {
name = "android-env";
targetPkgs = pkgs: with pkgs; [
git
gitRepo
gnupg
python2
curl
procps
openssl
gnumake
nettools
android-tools
jdk8
schedtool
util-linux
m4
gperf
perl
libxml2
zip
unzip
bison
flex
lzop
xz
python3
];
multiPkgs = pkgs: with pkgs; [
zlib
ncurses5
pkgsi686Linux.gcc9
pkgsi686Linux.libstdcxx5
];
runScript = "bash";
profile = "export ANDROID_JAVA_HOME=${pkgs.jdk8.home}";
};
in pkgs.stdenv.mkDerivation {
name = "android-env-shell";
nativeBuildInputs = [ fhs ];
shellHook = ''
if [ -n "$BASH_EXECUTION_STRING" ]; then
exec android-env -c "$BASH_EXECUTION_STRING"
fi
exec android-env
'';
}