push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
{
lib,
fetchPypi,
buildPythonPackage,
pytestCheckHook,
dotnetCorePackages,
setuptools,
setuptools-scm,
wheel,
buildDotnetModule,
cffi,
}:
let
pname = "clr-loader";
version = "0.2.7.post0";
src = fetchPypi {
pname = "clr_loader";
inherit version;
hash = "sha256-t6iz+PuxvLu2OC2IfiHRdC1PELXqIJ5K2VVo/pfhx8Y=";
};
patches = [ ./dotnet-8-upgrade.patch ];
# This stops msbuild from picking up $version from the environment
postPatch = ''
echo '<Project><PropertyGroup><Version/></PropertyGroup></Project>' > \
Directory.Build.props
'';
# This buildDotnetModule is used only to get nuget sources, the actual
# build is done in `buildPythonPackage` below.
dotnet-build = buildDotnetModule {
inherit
pname
version
src
patches
postPatch
;
projectFile = [
"netfx_loader/ClrLoader.csproj"
"example/example.csproj"
];
nugetDeps = ./deps.json;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
};
in
buildPythonPackage {
inherit
pname
version
src
patches
postPatch
;
format = "pyproject";
buildInputs = dotnetCorePackages.sdk_8_0.packages ++ dotnet-build.nugetDeps;
nativeBuildInputs = [
setuptools
setuptools-scm
wheel
dotnetCorePackages.sdk_8_0
];
propagatedBuildInputs = [ cffi ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# TODO: mono does not work due to https://github.com/NixOS/nixpkgs/issues/7307
"test_mono"
"test_mono_debug"
"test_mono_signal_chaining"
"test_mono_set_dir"
];
# Perform dotnet restore based on the nuget-source
preConfigure = ''
dotnet restore "netfx_loader/ClrLoader.csproj" \
-p:ContinuousIntegrationBuild=true \
-p:Deterministic=true
dotnet restore "example/example.csproj" \
-p:ContinuousIntegrationBuild=true \
-p:Deterministic=true
'';
passthru.fetch-deps = dotnet-build.fetch-deps;
meta = with lib; {
description = "Generic pure Python loader for .NET runtimes";
homepage = "https://pythonnet.github.io/clr-loader/";
license = licenses.mit;
maintainers = with maintainers; [ mdarocha ];
};
}

View File

@@ -0,0 +1,32 @@
[
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.1.0",
"hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM="
},
{
"pname": "Microsoft.NETFramework.ReferenceAssemblies",
"version": "1.0.0",
"hash": "sha256-6faPQ4jaFY3OGGVk3lZKW+DEZaIOBZ/wHqbiDTsRR1k="
},
{
"pname": "Microsoft.NETFramework.ReferenceAssemblies.net461",
"version": "1.0.0",
"hash": "sha256-oS7sUMzKBkLmhggqbI6eBqb1OPAipH0TDTaDaBixcwM="
},
{
"pname": "Microsoft.NETFramework.ReferenceAssemblies.net47",
"version": "1.0.0",
"hash": "sha256-Jh40dua+AQpSUGTOCQG493sJzbfqH+yIgyoA6+A1ZQM="
},
{
"pname": "NETStandard.Library",
"version": "2.0.3",
"hash": "sha256-Prh2RPebz/s8AzHb2sPHg3Jl8s31inv9k+Qxd293ybo="
},
{
"pname": "NXPorts",
"version": "1.0.0",
"hash": "sha256-kpqQDljgsCBRDqbuJkgwClG3dkgjrBAhtXoPZlJR+ws="
}
]

View File

@@ -0,0 +1,31 @@
diff --git a/example/example.csproj b/example/example.csproj
index fd6d566..ed76d15 100644
--- a/example/example.csproj
+++ b/example/example.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFrameworks>net60;netstandard20</TargetFrameworks>
+ <TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<ItemGroup>
diff --git a/tests/test_common.py b/tests/test_common.py
index 8a9e36d..8370024 100644
--- a/tests/test_common.py
+++ b/tests/test_common.py
@@ -8,12 +8,12 @@ from pathlib import Path
@pytest.fixture(scope="session")
def example_netstandard(tmpdir_factory):
- return build_example(tmpdir_factory, "netstandard20")
+ return build_example(tmpdir_factory, "netstandard2.0")
@pytest.fixture(scope="session")
def example_netcore(tmpdir_factory):
- return build_example(tmpdir_factory, "net60")
+ return build_example(tmpdir_factory, "net8.0")
def build_example(tmpdir_factory, framework):