2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2018-10-16 18:25:46 -04:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-10-28 12:48:37 -07:00
|
|
|
, fetchpatch
|
2021-03-24 13:18:40 +01:00
|
|
|
, setuptools-scm
|
2022-10-28 12:48:37 -07:00
|
|
|
, pytestCheckHook
|
2018-10-16 18:25:46 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mpmath";
|
2021-03-24 10:28:18 +01:00
|
|
|
version = "1.2.1";
|
2018-10-16 18:25:46 -04:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 10:28:18 +01:00
|
|
|
sha256 = "79ffb45cf9f4b101a807595bcb3e72e0396202e0b1d25d689134b48c4216a81a";
|
2018-10-16 18:25:46 -04:00
|
|
|
};
|
|
|
|
|
2022-10-28 12:48:37 -07:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2021-29063.patch";
|
|
|
|
url = "https://github.com/fredrik-johansson/mpmath/commit/46d44c3c8f3244017fe1eb102d564eb4ab8ef750.patch";
|
|
|
|
hash = "sha256-DaZ6nj9rEsjTAomu481Ujun364bL5E6lkXFvgBfHyeA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-24 13:18:40 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2022-10-28 12:48:37 -07:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2018-10-16 18:25:46 -04:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-01-26 01:33:42 +01:00
|
|
|
homepage = "https://mpmath.org/";
|
2018-10-16 18:25:46 -04:00
|
|
|
description = "A pure-Python library for multiprecision floating arithmetic";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|