1{ lib 2, buildPythonPackage 3, cython 4, fetchpatch 5, fetchPypi 6, gmpy2 7, mpmath 8, numpy 9, pythonOlder 10, scipy 11, setuptools-scm 12, wheel 13}: 14 15buildPythonPackage rec { 16 pname = "diofant"; 17 version = "0.14.0"; 18 format = "pyproject"; 19 disabled = pythonOlder "3.10"; 20 21 src = fetchPypi { 22 inherit version; 23 pname = "Diofant"; 24 hash = "sha256-c886y37xR+4TxZw9+3tb7nkTGxWcS+Ag/ruUUdpf7S4="; 25 }; 26 27 patches = [ 28 (fetchpatch { 29 name = "remove-pip-from-build-dependencies.patch"; 30 url = "https://github.com/diofant/diofant/commit/117e441808faa7c785ccb81bf211772d60ebdec3.patch"; 31 hash = "sha256-MYk1Ku4F3hAv7+jJQLWhXd8qyKRX+QYuBzPfYWT0VbU="; 32 }) 33 ]; 34 35 nativeBuildInputs = [ 36 setuptools-scm 37 wheel 38 ]; 39 40 propagatedBuildInputs = [ 41 mpmath 42 ]; 43 44 passthru.optional-dependencies = { 45 exports = [ 46 cython 47 numpy 48 scipy 49 ]; 50 gmpy = [ 51 gmpy2 52 ]; 53 }; 54 55 # tests take ~1h 56 doCheck = false; 57 58 pythonImportsCheck = [ "diofant" ]; 59 60 meta = with lib; { 61 description = "A Python CAS library"; 62 homepage = "https://diofant.readthedocs.io/"; 63 license = licenses.bsd3; 64 maintainers = with maintainers; [ suhr ]; 65 }; 66}