androidenv: fix missing packages in repo json (#208137)
This commit is contained in:
parent
eb32539c96
commit
2f688374e0
|
@ -3,10 +3,10 @@
|
|||
}:
|
||||
|
||||
{ toolsVersion ? "26.1.1"
|
||||
, platformToolsVersion ? "33.0.2"
|
||||
, buildToolsVersions ? [ "32.0.0" ]
|
||||
, platformToolsVersion ? "33.0.3"
|
||||
, buildToolsVersions ? [ "33.0.1" ]
|
||||
, includeEmulator ? false
|
||||
, emulatorVersion ? "31.3.9"
|
||||
, emulatorVersion ? "31.3.14"
|
||||
, platformVersions ? []
|
||||
, includeSources ? false
|
||||
, includeSystemImages ? false
|
||||
|
@ -14,7 +14,7 @@
|
|||
, abiVersions ? [ "armeabi-v7a" "arm64-v8a" ]
|
||||
, cmakeVersions ? [ ]
|
||||
, includeNDK ? false
|
||||
, ndkVersion ? "24.0.8215888"
|
||||
, ndkVersion ? "25.1.8937393"
|
||||
, ndkVersions ? [ndkVersion]
|
||||
, useGoogleAPIs ? false
|
||||
, useGoogleTVAddOns ? false
|
||||
|
|
|
@ -6,12 +6,15 @@
|
|||
url = "https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz";
|
||||
sha256 = "1wg61h4gndm3vcprdcg7rc4s1v3jkm5xd7lw8r2f67w502y94gcy";
|
||||
}),
|
||||
pkgs ? import nixpkgsSource {},
|
||||
pkgsi686Linux ? import nixpkgsSource { system = "i686-linux"; },*/
|
||||
pkgs ? import nixpkgsSource {
|
||||
config.allowUnfree = true;
|
||||
},
|
||||
*/
|
||||
|
||||
# If you want to use the in-tree version of nixpkgs:
|
||||
pkgs ? import ../../../../.. {},
|
||||
pkgsi686Linux ? import ../../../../.. { system = "i686-linux"; },
|
||||
pkgs ? import ../../../../.. {
|
||||
config.allowUnfree = true;
|
||||
},
|
||||
|
||||
config ? pkgs.config
|
||||
}:
|
||||
|
@ -23,17 +26,17 @@ let
|
|||
android = {
|
||||
versions = {
|
||||
tools = "26.1.1";
|
||||
platformTools = "31.0.2";
|
||||
platformTools = "33.0.3";
|
||||
buildTools = "30.0.3";
|
||||
ndk = [
|
||||
"22.1.7171670"
|
||||
"21.3.6528147" # LTS NDK
|
||||
"25.1.8937393" # LTS NDK
|
||||
"24.0.8215888"
|
||||
];
|
||||
cmake = "3.18.1";
|
||||
emulator = "30.6.3";
|
||||
cmake = "3.22.1";
|
||||
emulator = "31.3.14";
|
||||
};
|
||||
|
||||
platforms = ["23" "24" "25" "26" "27" "28" "29" "30"];
|
||||
platforms = ["23" "24" "25" "26" "27" "28" "29" "30" "31" "32" "33"];
|
||||
abis = ["armeabi-v7a" "arm64-v8a"];
|
||||
extras = ["extras;google;gcm"];
|
||||
};
|
||||
|
@ -46,13 +49,13 @@ let
|
|||
};
|
||||
|
||||
androidEnv = pkgs.callPackage "${androidEnvNixpkgs}/pkgs/development/mobile/androidenv" {
|
||||
inherit config pkgs pkgsi686Linux;
|
||||
inherit config pkgs;
|
||||
licenseAccepted = true;
|
||||
};*/
|
||||
|
||||
# Otherwise, just use the in-tree androidenv:
|
||||
androidEnv = pkgs.callPackage ./.. {
|
||||
inherit config pkgs pkgsi686Linux;
|
||||
inherit config pkgs;
|
||||
licenseAccepted = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -154,6 +154,7 @@ def normalize_license license
|
|||
license = license.dup
|
||||
license.gsub!(/([^\n])\n([^\n])/m, '\1 \2')
|
||||
license.gsub!(/ +/, ' ')
|
||||
license.strip!
|
||||
license
|
||||
end
|
||||
|
||||
|
@ -281,8 +282,18 @@ def parse_addon_xml doc
|
|||
[licenses, addons, extras]
|
||||
end
|
||||
|
||||
def merge_recursively a, b
|
||||
a.merge!(b) {|key, a_item, b_item|
|
||||
if a_item.is_a?(Hash) && b_item.is_a?(Hash)
|
||||
merge_recursively(a_item, b_item)
|
||||
else
|
||||
a[key] = b_item
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def merge dest, src
|
||||
dest.merge! src
|
||||
merge_recursively dest, src
|
||||
end
|
||||
|
||||
opts = Slop.parse do |o|
|
||||
|
@ -300,19 +311,19 @@ result = {
|
|||
}
|
||||
|
||||
opts[:packages].each do |filename|
|
||||
licenses, packages = parse_package_xml(Nokogiri::XML(File.open(filename)))
|
||||
licenses, packages = parse_package_xml(Nokogiri::XML(File.open(filename)) { |conf| conf.noblanks })
|
||||
merge result[:licenses], licenses
|
||||
merge result[:packages], packages
|
||||
end
|
||||
|
||||
opts[:images].each do |filename|
|
||||
licenses, images = parse_image_xml(Nokogiri::XML(File.open(filename)))
|
||||
licenses, images = parse_image_xml(Nokogiri::XML(File.open(filename)) { |conf| conf.noblanks })
|
||||
merge result[:licenses], licenses
|
||||
merge result[:images], images
|
||||
end
|
||||
|
||||
opts[:addons].each do |filename|
|
||||
licenses, addons, extras = parse_addon_xml(Nokogiri::XML(File.open(filename)))
|
||||
licenses, addons, extras = parse_addon_xml(Nokogiri::XML(File.open(filename)) { |conf| conf.noblanks })
|
||||
merge result[:licenses], licenses
|
||||
merge result[:addons], addons
|
||||
merge result[:extras], extras
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue