;;; SPDX-FileCopyrightText: 2021 Jelle Licht ;;; SPDX-License-Identifier: GPL-3.0-or-later (use-modules (gnu) (guix) (guix build-system copy) ((guix licenses) #:prefix license:) (guix profiles)) (use-package-modules base bash compression gcc gl glib linux nss pulseaudio version-control virtualization xml xorg gawk gnome java fontutils android) (define license (@@ (guix licenses) license)) (define* (nonfree uri #:optional (comment "")) "Return a nonfree license, whose full text can be found at URI, which may be a file:// URI pointing the package's tree." (license "Nonfree" uri (string-append "This a nonfree license. Check the URI for details. " comment))) (define adobe-dng-sdk-license (license "Adobe DNG SDK License Agreement" "https://www.adobe.com/support/downloads/dng/dng_sdk_eula_mac.html" "")) (define android-studio (let ((build "202.7351085")) (package (name "android-studio") (version "2020.3.1.19") (source (origin (method url-fetch) (uri (string-append "https://dl.google.com/dl/android/studio/ide-zips/" version "/android-studio-" version "-linux.tar.gz" )) (sha256 (base32 "00vzj9z9fyvbhirmdz6sfkh3mwvgyvvv1icnrhx3nc1hay4rjm3y")) (file-name (string-append name "-" version ".tar.gz")))) (build-system copy-build-system) (arguments `(#:install-plan `(("bin" "bin") ("jre" "jre") ("lib" "lib") ("plugins" "plugins")) ;; Don't strip bundled binaries #:strip-binaries? #f #:validate-runpath? #f #:phases (modify-phases %standard-phases (add-after 'install 'install-desktop-file (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (applications (string-append out "/share/applications")) (desktop-file (string-append applications "/android-studio.desktop")) (icon (string-append out "/bin/studio.png"))) (mkdir-p applications) (with-output-to-file desktop-file (lambda _ (format #t "[Desktop Entry] Version=1.0 Type=Application Name=Android Studio Exec=\"android-studio\" Icon=~a Categories=Development;IDE; Terminal=false StartupNotify=true StartupWMClass=jetbrains-android-studio Name[en_GB]=android-studio.desktop" icon))))))))) (inputs `(("openjdk" ,openjdk14 "jdk"))) (home-page "https://developer.android.com/studio") (synopsis "Tools for building apps on every type of Android device") (description "Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA.") (license (list license:asl1.1 license:asl2.0 license:bsd-2 license:bsd-3 license:bsd-4 license:cddl1.1 license:epl1.0 license:epl2.0 license:expat license:ijg license:lgpl2.1 license:lgpl2.1+ license:mpl1.0 license:mpl1.1 license:x11 license:zlib adobe-dng-sdk-license (nonfree "file://license/oromatcher_license.txt") (license:x11-style "file://license/libharfbuzz_ng.txt" "See 'license/libharfbuzz_ng.txt' in the distribution.")))))) (packages->manifest (list (list gcc "lib") (list openjdk14 "jdk") (list util-linux "lib") adb alsa-lib android-studio bash coreutils dbus e2fsprogs expat findutils fontconfig gawk git glibc glibc-locales grep inotify-tools libnotify libx11 libxcomposite libxcursor libxi libxtst mesa nss procps pulseaudio qemu-minimal sed usbutils which zenity zlib))