Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet: improve EOL evaluation errors #363439

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions pkgs/development/compilers/dotnet/build-dotnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let

in
mkWrapper type (
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
inherit pname version;

# Some of these dependencies are `dlopen()`ed.
Expand Down Expand Up @@ -194,19 +194,29 @@ mkWrapper type (
{
inherit icu hasILCompiler;
}
// lib.optionalAttrs (type == "sdk") {
packages = commonPackages ++ hostPackages.${hostRid} ++ targetPackages.${targetRid};
inherit targetPackages runtime aspnetcore;

updateScript =
let
majorVersion = lib.concatStringsSep "." (lib.take 2 (lib.splitVersion version));
in
[
./update.sh
majorVersion
];
};
// lib.optionalAttrs (type == "sdk") (
let
# force evaluation of the SDK package to ensure evaluation failures
# (e.g. due to vulnerabilities) propagate to the nuget packages
forceSDKEval = builtins.seq finalAttrs.finalPackage.drvPath;
in
{
packages = map forceSDKEval (
commonPackages ++ hostPackages.${hostRid} ++ targetPackages.${targetRid}
);
targetPackages = lib.mapAttrs (_: map forceSDKEval) targetPackages;
inherit runtime aspnetcore;

updateScript =
let
majorVersion = lib.concatStringsSep "." (lib.take 2 (lib.splitVersion version));
in
[
./update.sh
majorVersion
];
}
);

meta = with lib; {
description = builtins.getAttr type descriptions;
Expand Down Expand Up @@ -239,5 +249,5 @@ mkWrapper type (
"Dotnet SDK ${version} is EOL, please use 8.0 (LTS) or 9.0 (Current)"
];
};
}
})
)
11 changes: 10 additions & 1 deletion pkgs/development/compilers/dotnet/combine-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,14 @@ mkWrapper "sdk" (buildEnv {
);
};

inherit (cli) meta;
meta = {
description = "${cli.meta.description or "dotnet"} (combined)";
inherit (cli.meta)
homepage
license
mainProgram
maintainers
platforms
;
};
})
13 changes: 12 additions & 1 deletion pkgs/development/compilers/dotnet/wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@
type: unwrapped:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "${unwrapped.pname}-wrapped";
inherit (unwrapped) version meta;
inherit (unwrapped) version;

meta = {
description = "${unwrapped.meta.description or "dotnet"} (wrapper)";
mainProgram = "dotnet";
inherit (unwrapped.meta)
homepage
license
maintainers
platforms
;
};

src = unwrapped;
dontUnpack = true;
Expand Down
Loading