9 stdenvNoCC.mkDerivation {
10 pname = "android-studio-tools";
14 # The only difference between the Linux and Mac versions is a single comment at the top of all the scripts
15 # Therefore, we will use the Linux version and just patch the comment
16 url = "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip";
17 hash = "sha256-NjxJzHRT2/zZ9YzzjqaMVxpOELkDneQgc1/y1GUnZow=";
21 find . -type f -not -path "./bin/*" -exec chmod -x {} \;
22 '' + lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
23 for f in cmdline-tools/bin/*; do
24 sed -i 's|start up script for Linux|start up script for Mac|' $f
28 nativeBuildInputs = [ makeWrapper ];
39 for f in $out/bin/*; do
40 wrapProgram $f --set JAVA_HOME "${openjdk}"
47 description = "Android Studio CLI Tools";
48 homepage = "https://developer.android.com/studio";
49 downloadPage = "https://developer.android.com/studio";
50 changelog = "https://developer.android.com/studio/releases";
51 license = lib.licenses.unfree;
52 maintainers = with lib.maintainers; [ pandapip1 ];
53 platforms = lib.platforms.all;
54 sourceProvenance = with lib.sourceTypes; [ fromSource ]; # The 'binaries' are actually shell scripts