Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch, 6 matchpy, 7 pytestCheckHook, 8 pythonOlder, 9 pytools, 10}: 11 12buildPythonPackage rec { 13 pname = "pymbolic"; 14 version = "2022.2"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-+Cd2lCuzy3Iyn6Hxqito7AnyN9uReMlc/ckqaup87Ik="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 url = "https://github.com/inducer/pymbolic/commit/cb3d999e4788dad3edf053387b6064adf8b08e19.patch"; 27 excludes = [ ".github/workflows/ci.yml" ]; 28 hash = "sha256-P0YjqAo0z0LZMIUTeokwMkfP8vxBXi3TcV4BSFaO1lU="; 29 }) 30 ]; 31 32 propagatedBuildInputs = [ pytools ]; 33 34 nativeCheckInputs = [ 35 matchpy 36 pytestCheckHook 37 ]; 38 39 postPatch = '' 40 # pytest is a test requirement not a run-time one 41 substituteInPlace setup.py \ 42 --replace '"pytest>=2.3",' "" 43 ''; 44 45 pythonImportsCheck = [ "pymbolic" ]; 46 47 meta = with lib; { 48 description = "Package for symbolic computation"; 49 homepage = "https://documen.tician.de/pymbolic/"; 50 license = licenses.mit; 51 maintainers = [ ]; 52 }; 53}