Merge pull request #123200 from s1341/fix_max_llvm_packages

Fix max llvm packages from string comparison to int comparison

authored by John Ericson and committed by GitHub 39ca9976 3f061ca1

+8 -7
+8 -7
pkgs/top-level/all-packages.nix
··· 11224 11224 # This returns the minimum suported version for the platform. The 11225 11225 # assumption is that or any later version is good. 11226 11226 choose = platform: 11227 - /**/ if platform.isDarwin then "7" 11228 - else if platform.isFreeBSD then "7" 11229 - else if platform.isAndroid then "12" 11230 - else if platform.isLinux then "7" 11231 - else if platform.isWasm then "8" 11232 - else "latest"; 11227 + /**/ if platform.isDarwin then 7 11228 + else if platform.isFreeBSD then 7 11229 + else if platform.isAndroid then 12 11230 + else if platform.isLinux then 7 11231 + else if platform.isWasm then 8 11232 + else 11; # latest 11233 11233 # We take the "max of the mins". Why? Since those are lower bounds of the 11234 11234 # supported version set, this is like intersecting those sets and then 11235 11235 # taking the min bound of that. 11236 - minSupported = lib.max (choose stdenv.hostPlatform) (choose stdenv.targetPlatform); 11236 + minSupported = toString (lib.trivial.max (choose stdenv.hostPlatform) (choose 11237 + stdenv.targetPlatform)); 11237 11238 in pkgs.${"llvmPackages_${minSupported}"}; 11238 11239 11239 11240 llvmPackages_5 = recurseIntoAttrs (callPackage ../development/compilers/llvm/5 {