diff options
Diffstat (limited to 'pkgs/development/python-modules/pythonnet/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pythonnet/default.nix | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/pythonnet/default.nix b/pkgs/development/python-modules/pythonnet/default.nix index 5a2272c668c3..765db395d0bc 100644 --- a/pkgs/development/python-modules/pythonnet/default.nix +++ b/pkgs/development/python-modules/pythonnet/default.nix @@ -1,28 +1,32 @@ -{ lib -, fetchPypi -, buildPythonPackage -, pytestCheckHook -, pycparser -, psutil -, dotnet-sdk -, buildDotnetModule -, clr-loader -, setuptools +{ + lib, + fetchFromGitHub, + buildPythonPackage, + pytestCheckHook, + pycparser, + psutil, + dotnet-sdk, + buildDotnetModule, + clr-loader, + setuptools, }: let pname = "pythonnet"; - version = "3.0.3"; - src = fetchPypi { - pname = "pythonnet"; - inherit version; - hash = "sha256-jUsulxWKAjh1+GR0WKWPOIF/T+Oa9gq91rDYrfHXfnU="; + version = "3.0.4"; + src = fetchFromGitHub { + owner = "pythonnet"; + repo = "pythonnet"; + rev = "v${version}"; + hash = "sha256-QdgcBFQDFxmFxuXsDlHcu+L/VWw2aKfyWDqPrawyhOs="; }; # This buildDotnetModule is used only to get nuget sources, the actual # build is done in `buildPythonPackage` below. dotnet-build = buildDotnetModule { inherit pname version src; + projectFile = "src/runtime/Python.Runtime.csproj"; + testProjectFile = "src/testing/Python.Test.csproj"; nugetDeps = ./deps.nix; }; in @@ -36,6 +40,8 @@ buildPythonPackage { --replace 'dynamic = ["version"]' 'version = "${version}"' ''; + buildInputs = dotnet-build.nugetDeps; + nativeBuildInputs = [ setuptools dotnet-sdk @@ -56,14 +62,6 @@ buildPythonPackage { psutil # needed for memory leak tests ]; - # Perform dotnet restore based on the nuget-source - preConfigure = '' - dotnet restore \ - -p:ContinuousIntegrationBuild=true \ - -p:Deterministic=true \ - --source ${dotnet-build.nuget-source} - ''; - # Rerun this when updating to refresh Nuget dependencies passthru.fetch-deps = dotnet-build.fetch-deps; @@ -74,6 +72,9 @@ buildPythonPackage { license = licenses.mit; # <https://github.com/pythonnet/pythonnet/issues/898> badPlatforms = [ "aarch64-linux" ]; - maintainers = with maintainers; [ jraygauthier mdarocha ]; + maintainers = with maintainers; [ + jraygauthier + mdarocha + ]; }; } |