diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/python-modules/pythonnet/default.nix | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pythonnet/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pythonnet/default.nix | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pythonnet/default.nix b/nixpkgs/pkgs/development/python-modules/pythonnet/default.nix index d0054f7076a1..7387d387dbec 100644 --- a/nixpkgs/pkgs/development/python-modules/pythonnet/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pythonnet/default.nix @@ -2,8 +2,7 @@ , fetchPypi , fetchNuGet , buildPythonPackage -, python -, pytest +, pytestCheckHook , pycparser , psutil , pkg-config @@ -15,29 +14,36 @@ let - UnmanagedExports127 = fetchNuGet { - baseName = "UnmanagedExports"; - version = "1.2.7"; - sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf"; - outputFiles = [ "*" ]; - }; - - NUnit371 = fetchNuGet { - baseName = "NUnit"; - version = "3.7.1"; - sha256 = "1yc6dwaam4w2ss1193v735nnl79id78yswmpvmjr1w4bgcbdza4l"; - outputFiles = [ "*" ]; - }; + dotnetPkgs = [ + (fetchNuGet { + baseName = "UnmanagedExports"; + version = "1.2.7"; + sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf"; + outputFiles = [ "*" ]; + }) + (fetchNuGet { + baseName = "NUnit"; + version = "3.12.0"; + sha256 = "1880j2xwavi8f28vxan3hyvdnph4nlh5sbmh285s4lc9l0b7bdk2"; + outputFiles = [ "*" ]; + }) + (fetchNuGet { + baseName = "System.ValueTuple"; + version = "4.5.0"; + sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy"; + outputFiles = [ "*" ]; + }) + ]; in buildPythonPackage rec { pname = "pythonnet"; - version = "2.4.0"; + version = "2.5.2"; src = fetchPypi { inherit pname version; - sha256 = "1ach9jic7a9rd3vmc4bphkr9fq01a0qk81f8a7gr9npwzmkqx8x3"; + sha256 = "1qzdc6jd7i9j7p6bcihnr98y005gv1358xqdr1plpbpnl6078a5p"; }; postPatch = '' @@ -50,7 +56,6 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ - pytest pycparser pkg-config @@ -59,13 +64,15 @@ buildPythonPackage rec { mono - NUnit371 - UnmanagedExports127 - ]; + ] ++ dotnetPkgs; buildInputs = [ glib mono + ]; + + checkInputs = [ + pytestCheckHook psutil # needed for memory leak tests ]; @@ -73,22 +80,21 @@ buildPythonPackage rec { rm -rf packages mkdir packages - ln -s ${NUnit371}/lib/dotnet/NUnit/ packages/NUnit.3.7.1 - ln -s ${UnmanagedExports127}/lib/dotnet/NUnit/ packages/UnmanagedExports.1.2.7 + ${builtins.concatStringsSep "\n" ( + builtins.map ( + x: ''ln -s ${x}/lib/dotnet/${x.baseName} ./packages/${x.baseName}.${x.version}'' + ) dotnetPkgs)} # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542 export TERM=xterm ''; - checkPhase = '' - ${python.interpreter} -m pytest - ''; - meta = with lib; { description = ".Net and Mono integration for Python"; homepage = "https://pythonnet.github.io"; license = licenses.mit; + # <https://github.com/pythonnet/pythonnet/issues/898> + badPlatforms = [ "aarch64-linux" ]; maintainers = with maintainers; [ jraygauthier ]; - broken = true; }; } |