Loading pkgs/development/mobile/androidenv/compose-android-packages.nix +6 −6 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ let # Coerces a string to an int. coerceInt = val: if lib.isInt val then val else lib.toIntBase10 val; coerceIntVersion = v: coerceInt (lib.versions.major v); # Parses a single version, substituting "latest" with the latest version. parseVersion = repo: key: version: Loading Loading @@ -97,8 +99,8 @@ in platformVersions ? if minPlatformVersion != null && maxPlatformVersion != null then let minPlatformVersionInt = coerceInt (parseVersion repo "platforms" minPlatformVersion); maxPlatformVersionInt = coerceInt (parseVersion repo "platforms" maxPlatformVersion); minPlatformVersionInt = coerceIntVersion (parseVersion repo "platforms" minPlatformVersion); maxPlatformVersionInt = coerceIntVersion (parseVersion repo "platforms" maxPlatformVersion); in lib.range (lib.min minPlatformVersionInt maxPlatformVersionInt) ( lib.max minPlatformVersionInt maxPlatformVersionInt Loading @@ -109,10 +111,8 @@ in if minPlatformVersion == null then 1 else coerceInt (parseVersion repo "platforms" minPlatformVersion); latestPlatformVersionInt = lib.max minPlatformVersionInt ( coerceInt (lib.versions.major repo.latest.platforms) ); coerceIntVersion (parseVersion repo "platforms" minPlatformVersion); latestPlatformVersionInt = lib.max minPlatformVersionInt (coerceIntVersion repo.latest.platforms); firstPlatformVersionInt = lib.max minPlatformVersionInt ( latestPlatformVersionInt - (lib.max 1 numLatestPlatformVersions) + 1 ); Loading Loading
pkgs/development/mobile/androidenv/compose-android-packages.nix +6 −6 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ let # Coerces a string to an int. coerceInt = val: if lib.isInt val then val else lib.toIntBase10 val; coerceIntVersion = v: coerceInt (lib.versions.major v); # Parses a single version, substituting "latest" with the latest version. parseVersion = repo: key: version: Loading Loading @@ -97,8 +99,8 @@ in platformVersions ? if minPlatformVersion != null && maxPlatformVersion != null then let minPlatformVersionInt = coerceInt (parseVersion repo "platforms" minPlatformVersion); maxPlatformVersionInt = coerceInt (parseVersion repo "platforms" maxPlatformVersion); minPlatformVersionInt = coerceIntVersion (parseVersion repo "platforms" minPlatformVersion); maxPlatformVersionInt = coerceIntVersion (parseVersion repo "platforms" maxPlatformVersion); in lib.range (lib.min minPlatformVersionInt maxPlatformVersionInt) ( lib.max minPlatformVersionInt maxPlatformVersionInt Loading @@ -109,10 +111,8 @@ in if minPlatformVersion == null then 1 else coerceInt (parseVersion repo "platforms" minPlatformVersion); latestPlatformVersionInt = lib.max minPlatformVersionInt ( coerceInt (lib.versions.major repo.latest.platforms) ); coerceIntVersion (parseVersion repo "platforms" minPlatformVersion); latestPlatformVersionInt = lib.max minPlatformVersionInt (coerceIntVersion repo.latest.platforms); firstPlatformVersionInt = lib.max minPlatformVersionInt ( latestPlatformVersionInt - (lib.max 1 numLatestPlatformVersions) + 1 ); Loading