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=";
22 find . -type f -not -path "./bin/*" -exec chmod -x {} \;
24 + lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
25 for f in cmdline-tools/bin/*; do
26 sed -i 's|start up script for Linux|start up script for Mac|' $f
30 nativeBuildInputs = [ makeWrapper ];
41 for f in $out/bin/*; do
42 wrapProgram $f --set JAVA_HOME "${openjdk}"
49 description = "Android Studio CLI Tools";
50 homepage = "https://developer.android.com/studio";
51 downloadPage = "https://developer.android.com/studio";
52 changelog = "https://developer.android.com/studio/releases";
53 license = lib.licenses.unfree;
54 maintainers = with lib.maintainers; [ pandapip1 ];
55 platforms = lib.platforms.all;
56 sourceProvenance = with lib.sourceTypes; [ fromSource ]; # The 'binaries' are actually shell scripts