Merge pull request #272113 from mdarocha/build-dotnet-version-fix

buildDotnetModule: fix rare error when evaluation of version fails
This commit is contained in:
Peder Bergebakken Sundt 2023-12-07 02:55:51 +01:00 committed by GitHub
commit 17411d69e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,7 @@ stdenvNoCC.mkDerivation (args // {
components = lib.pipe args.version [
lib.splitVersion
(lib.filter (x: (lib.strings.match "[0-9]+" x) != null))
(lib.filter (x: (lib.toInt x) < 65535)) # one version component in dotnet has to fit in 16 bits
(lib.filter (x: (lib.toIntBase10 x) < 65535)) # one version component in dotnet has to fit in 16 bits
];
in if (lib.length components) == 0
then null