1{ lib 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, setuptools-scm 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "mpmath"; 11 version = "1.2.1"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "79ffb45cf9f4b101a807595bcb3e72e0396202e0b1d25d689134b48c4216a81a"; 16 }; 17 18 patches = [ 19 (fetchpatch { 20 name = "CVE-2021-29063.patch"; 21 url = "https://github.com/fredrik-johansson/mpmath/commit/46d44c3c8f3244017fe1eb102d564eb4ab8ef750.patch"; 22 hash = "sha256-DaZ6nj9rEsjTAomu481Ujun364bL5E6lkXFvgBfHyeA="; 23 }) 24 ]; 25 26 nativeBuildInputs = [ 27 setuptools-scm 28 ]; 29 30 checkInputs = [ 31 pytestCheckHook 32 ]; 33 34 meta = with lib; { 35 homepage = "https://mpmath.org/"; 36 description = "A pure-Python library for multiprecision floating arithmetic"; 37 license = licenses.bsd3; 38 maintainers = with maintainers; [ lovek323 ]; 39 platforms = platforms.unix; 40 }; 41 42}