From 611be96fd91496423cc48718e6d2e795ed2aa073 Mon Sep 17 00:00:00 2001 From: gbtb Date: Tue, 10 May 2022 22:45:41 +1000 Subject: [PATCH 1/2] dotnet: fixed runtime error for dotnet 3.1 after icu update --- pkgs/development/compilers/dotnet/build-dotnet.nix | 3 +-- pkgs/development/compilers/dotnet/default.nix | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix index 4a30107bbec..67ce79ca575 100644 --- a/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -1,6 +1,7 @@ { type , version , srcs +, icu #passing icu as an argument, because dotnet 3.1 has troubles with icu71 }: assert builtins.elem type [ "aspnetcore" "runtime" "sdk"]; @@ -11,7 +12,6 @@ assert builtins.elem type [ "aspnetcore" "runtime" "sdk"]; , writeText , libunwind , openssl -, icu , libuuid , zlib , curl @@ -38,7 +38,6 @@ in stdenv.mkDerivation rec { rpath = lib.makeLibraryPath ([ stdenv.cc.cc zlib - curl icu libunwind diff --git a/pkgs/development/compilers/dotnet/default.nix b/pkgs/development/compilers/dotnet/default.nix index 87256e95b02..dc3564f6003 100644 --- a/pkgs/development/compilers/dotnet/default.nix +++ b/pkgs/development/compilers/dotnet/default.nix @@ -5,7 +5,7 @@ dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_5_0 aspn Hashes and urls below are retrieved from: https://dotnet.microsoft.com/download/dotnet */ -{ callPackage }: +{ callPackage, icu70, icu }: let buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {}; buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; }); @@ -22,6 +22,7 @@ rec { # v3.1 (lts) aspnetcore_3_1 = buildAspNetCore { + icu = icu70; version = "3.1.21"; srcs = { x86_64-linux = { @@ -40,6 +41,7 @@ rec { }; runtime_3_1 = buildNetRuntime { + icu = icu70; version = "3.1.21"; srcs = { x86_64-linux = { @@ -58,6 +60,7 @@ rec { }; sdk_3_1 = buildNetSdk { + icu = icu70; version = "3.1.415"; srcs = { x86_64-linux = { @@ -77,6 +80,7 @@ rec { # v5.0 (current) aspnetcore_5_0 = buildAspNetCore { + inherit icu; version = "5.0.12"; srcs = { x86_64-linux = { @@ -95,6 +99,7 @@ rec { }; runtime_5_0 = buildNetRuntime { + inherit icu; version = "5.0.12"; srcs = { x86_64-linux = { @@ -113,6 +118,7 @@ rec { }; sdk_5_0 = buildNetSdk { + inherit icu; version = "5.0.403"; srcs = { x86_64-linux = { @@ -132,6 +138,7 @@ rec { # v6.0 (lts) aspnetcore_6_0 = buildAspNetCore { + inherit icu; version = "6.0.4"; srcs = { x86_64-linux = { @@ -154,6 +161,7 @@ rec { }; runtime_6_0 = buildNetRuntime { + inherit icu; version = "6.0.4"; srcs = { x86_64-linux = { @@ -176,6 +184,7 @@ rec { }; sdk_6_0 = buildNetSdk { + inherit icu; version = "6.0.202"; srcs = { x86_64-linux = { From e40670371ee119441cfc299f564809caffc2280c Mon Sep 17 00:00:00 2001 From: gbtb Date: Fri, 13 May 2022 21:50:26 +1000 Subject: [PATCH 2/2] dotnet: added icu attributes to hash auto-generation script --- pkgs/development/compilers/dotnet/default.nix | 2 ++ pkgs/development/compilers/dotnet/print-hashes.sh | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/pkgs/development/compilers/dotnet/default.nix b/pkgs/development/compilers/dotnet/default.nix index dc3564f6003..0740802ca4a 100644 --- a/pkgs/development/compilers/dotnet/default.nix +++ b/pkgs/development/compilers/dotnet/default.nix @@ -20,6 +20,8 @@ rec { sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 3.1 (LTS), 5.0 (Current) or 6.0 (LTS)"; sdk_3_0 = throw "Dotnet SDK 3.0 is EOL, please use 3.1 (LTS), 5.0 (Current) or 6.0 (LTS)"; + ##### Following attributes with urls and hashes should be auto-generated by print-hashes.sh ##### + # v3.1 (lts) aspnetcore_3_1 = buildAspNetCore { icu = icu70; diff --git a/pkgs/development/compilers/dotnet/print-hashes.sh b/pkgs/development/compilers/dotnet/print-hashes.sh index 966f0a9c061..162f1af70ec 100755 --- a/pkgs/development/compilers/dotnet/print-hashes.sh +++ b/pkgs/development/compilers/dotnet/print-hashes.sh @@ -84,6 +84,11 @@ Examples: aspnetcore_files="$(release_files "$release_content" "aspnetcore-runtime")" runtime_files="$(release_files "$release_content" "runtime")" sdk_files="$(release_files "$release_content" "sdk")" + if [ $major_minor = "3.1" ]; then + icu_attr="icu = icu70;" + else + icu_attr="inherit icu;" + fi major_minor_underscore=${major_minor/./_} channel_version=$(jq -r '."channel-version"' <<< "$content") @@ -91,16 +96,19 @@ Examples: echo " # v$channel_version ($support_phase) aspnetcore_$major_minor_underscore = buildAspNetCore { + $icu_attr version = \"${aspnetcore_version}\"; $(platform_sources "$aspnetcore_files") }; runtime_$major_minor_underscore = buildNetRuntime { + $icu_attr version = \"${runtime_version}\"; $(platform_sources "$runtime_files") }; sdk_$major_minor_underscore = buildNetSdk { + $icu_attr version = \"${sdk_version}\"; $(platform_sources "$sdk_files") }; "