androidenv: fix weird package naming and add versions
Some of the system images and NDK packages looked like: `androidenv.androidPkgs.all.system_images.v35.google_apis_playstore.x_86___64`. `androidenv.androidPkgs.all.packages.ndk.v21_0_6011959_rc_2` Now they look like: `androidenv.androidPkgs.all.system-images.v35.google_apis_playstore.x86_64`. `androidenv.androidPkgs.all.packages.ndk.v21_0_6011959-rc2` They should also have the versions correctly attached now for s.n.o.
This commit is contained in:
parent
eb786288e1
commit
a59e06abc4
@ -175,6 +175,12 @@ let
|
|||||||
passthru = {
|
passthru = {
|
||||||
info = packageInfo;
|
info = packageInfo;
|
||||||
};
|
};
|
||||||
|
}).overrideAttrs
|
||||||
|
(prev: {
|
||||||
|
# fetchurl won't generate the correct filename if we specify pname and version,
|
||||||
|
# and we still want the version attribute to show up in search, so specify these in an override
|
||||||
|
pname = packageInfo.name;
|
||||||
|
version = packageInfo.revision;
|
||||||
})
|
})
|
||||||
) validArchives
|
) validArchives
|
||||||
)
|
)
|
||||||
@ -207,8 +213,11 @@ let
|
|||||||
# Converts things like 'extras;google;auto' to 'extras-google-auto'
|
# Converts things like 'extras;google;auto' to 'extras-google-auto'
|
||||||
toVersionKey =
|
toVersionKey =
|
||||||
name:
|
name:
|
||||||
lib.optionalString (lib.match "^[0-9].*" name != null) "v"
|
let
|
||||||
+ lib.concatStringsSep "_" (lib.splitVersion (lib.replaceStrings [ ";" ] [ "-" ] name));
|
normalizedName = lib.replaceStrings [ ";" "." ] [ "-" "_" ] name;
|
||||||
|
versionParts = lib.match "^([0-9][0-9\\.]*)(.*)$" normalizedName;
|
||||||
|
in
|
||||||
|
if versionParts == null then normalizedName else "v" + lib.concatStrings versionParts;
|
||||||
|
|
||||||
recurse = lib.mapAttrs' (
|
recurse = lib.mapAttrs' (
|
||||||
name: value:
|
name: value:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user