···631631 # This derivation deploys the tools package and symlinks all the desired
632632 # plugins that we want to use. If the license isn't accepted, prints all the licenses
633633 # requested and throws.
634634- androidsdk =
635635- if !licenseAccepted then
636636- throw ''
637637- ${builtins.concatStringsSep "\n\n" (mkLicenseTexts licenseNames)}
634634+ androidsdk = callPackage ./cmdline-tools.nix {
635635+ inherit
636636+ deployAndroidPackage
637637+ os
638638+ arch
639639+ meta
640640+ ;
638641639639- You must accept the following licenses:
640640- ${lib.concatMapStringsSep "\n" (str: " - ${str}") licenseNames}
642642+ package = cmdline-tools-package;
641643642642- a)
643643- by setting nixpkgs config option 'android_sdk.accept_license = true;'.
644644- b)
645645- by an environment variable for a single invocation of the nix tools.
646646- $ export NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE=1
647647- ''
648648- else
649649- callPackage ./cmdline-tools.nix {
650650- inherit
651651- deployAndroidPackage
652652- os
653653- arch
654654- meta
655655- ;
644644+ postInstall =
645645+ if !licenseAccepted then
646646+ throw ''
647647+ ${builtins.concatStringsSep "\n\n" (mkLicenseTexts licenseNames)}
656648657657- package = cmdline-tools-package;
649649+ You must accept the following licenses:
650650+ ${lib.concatMapStringsSep "\n" (str: " - ${str}") licenseNames}
658651659659- postInstall = ''
652652+ a)
653653+ by setting nixpkgs config option 'android_sdk.accept_license = true;'.
654654+ b)
655655+ by an environment variable for a single invocation of the nix tools.
656656+ $ export NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE=1
657657+ ''
658658+ else
659659+ ''
660660 # Symlink all requested plugins
661661 ${linkPlugin {
662662 name = "platform-tools";
···769769 ''
770770 ) licenseNames}
771771 '';
772772- };
772772+ };
773773}