dotnet: add buildDotnetModule tests to sdk passthru.tests

This commit is contained in:
David McFarland 2025-06-24 11:25:09 -03:00
parent 66023e4de2
commit cf8caed169
2 changed files with 12 additions and 1 deletions

View File

@ -18,6 +18,7 @@
replaceVars,
nugetPackageHook,
xmlstarlet,
pkgs,
}:
type: unwrapped:
stdenvNoCC.mkDerivation (finalAttrs: {
@ -280,6 +281,16 @@ stdenvNoCC.mkDerivation (finalAttrs: {
};
}
// lib.optionalAttrs (type == "sdk") ({
buildDotnetModule =
(pkgs.appendOverlays [
(self: super: {
dotnet-sdk = finalAttrs.finalPackage;
dotnet-runtime = finalAttrs.finalPackage.runtime;
})
]).callPackage
../../../test/dotnet/default.nix
{ };
console = lib.recurseIntoAttrs {
# yes, older SDKs omit the comma
cs = mkConsoleTests "C#" "cs" "Hello,?\\ World!";

View File

@ -26,7 +26,7 @@ let
'';
});
runtimeVersion = lib.getVersion dotnet-runtime;
runtimeVersion = lib.head (lib.splitString "-" (lib.getVersion dotnet-runtime));
runtimeVersionFile = builtins.toFile "dotnet-version.txt" runtimeVersion;
in
{