Unverified Commit b091eee5 authored by David McFarland's avatar David McFarland Committed by GitHub
Browse files

python312Packages.pythonnet: fix build (#353521)

parents 59d2f9da 1c3b10cf
Loading
Loading
Loading
Loading
+8 −13
Original line number Diff line number Diff line
{
  lib,
  fetchPypi,
  fetchFromGitHub,
  buildPythonPackage,
  pytestCheckHook,
  pycparser,
@@ -14,16 +14,19 @@
let
  pname = "pythonnet";
  version = "3.0.4";
  src = fetchPypi {
    pname = "pythonnet";
    inherit version;
    hash = "sha256-yS+8/d0WV19+daZDMCJxZYtgbYVX338BMqwkDgPMOo8=";
  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
@@ -59,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 "$nugetSource"
  '';

  # Rerun this when updating to refresh Nuget dependencies
  passthru.fetch-deps = dotnet-build.fetch-deps;

+27 −837

File changed.

Preview size limit exceeded, changes collapsed.