nixpkgs/pkgs/development/python-modules/pythonnet/default.nix
Linus Heckemann 5aa4b19946 treewide: mark some broken packages as broken
Refs:
e6754980264fe927320d5ff2dbd24ca4fac9a160
1e9cc5b9844ef603fe160e9f671178f96200774f
793a2fe1e8bb886ca2096c5904e1193dc3268b6d
c19cf65261639f749012454932a532aa7c681e4b
f6544d618f30fae0bc4798c4387a8c7c9c047a7c
2019-10-08 17:14:26 +02:00

86 lines
1.6 KiB
Nix

{ lib
, fetchPypi
, fetchNuGet
, buildPythonPackage
, python
, pytest
, pycparser
, pkgconfig
, dotnetbuildhelpers
, clang
, mono
}:
let
UnmanagedExports127 = fetchNuGet {
baseName = "UnmanagedExports";
version = "1.2.7";
sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf";
outputFiles = [ "*" ];
};
NUnit360 = fetchNuGet {
baseName = "NUnit";
version = "3.6.0";
sha256 = "0wz4sb0hxlajdr09r22kcy9ya79lka71w0k1jv5q2qj3d6g2frz1";
outputFiles = [ "*" ];
};
in
buildPythonPackage rec {
pname = "pythonnet";
version = "2.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "1hxnkrfj8ark9sbamcxzd63p98vgljfvdwh79qj3ac8pqrgghq80";
};
postPatch = ''
substituteInPlace setup.py --replace 'self._install_packages()' '#self._install_packages()'
'';
preConfigure = ''
[ -z "$dontPlacateNuget" ] && placate-nuget.sh
[ -z "$dontPlacatePaket" ] && placate-paket.sh
'';
nativeBuildInputs = [
pytest
pycparser
pkgconfig
dotnetbuildhelpers
clang
NUnit360
UnmanagedExports127
];
buildInputs = [
mono
];
preBuild = ''
rm -rf packages
mkdir packages
ln -s ${NUnit360}/lib/dotnet/NUnit/ packages/NUnit.3.6.0
ln -s ${UnmanagedExports127}/lib/dotnet/NUnit/ packages/UnmanagedExports.1.2.7
'';
checkPhase = ''
${python.interpreter} -m pytest
'';
meta = with lib; {
description = ".Net and Mono integration for Python";
homepage = https://pythonnet.github.io;
license = licenses.mit;
maintainers = with maintainers; [ jraygauthier ];
broken = true;
};
}