Last active
January 14, 2023 01:56
-
-
Save pokon548/334a92f21cbdb74705524ea012b20035 to your computer and use it in GitHub Desktop.
Setup magisk environment & toolchain in NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
pkgs ? import <nixpkgs> {}, | |
unstable ? import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) {}, | |
buildFHSUserEnv ? opt: (unstable.buildFHSUserEnv opt).env, | |
}: | |
buildFHSUserEnv rec { | |
name = "magisk-env"; | |
targetPkgs = p: (with pkgs; | |
[ | |
python3 | |
openjdk11-bootstrap | |
zlib | |
gcc | |
android-studio | |
] | |
); | |
# This setting assume that you are using the default path of sdk. | |
# Change this if you specify the path to somewhere else. | |
profile = "export ANDROID_SDK_ROOT=$HOME/Android/Sdk"; | |
runScript = "bash"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment