nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python312Packages.pymbolic: fix build

+19 -31
+19 -31
pkgs/development/python-modules/pymbolic/default.nix
··· 1 1 { 2 2 lib, 3 - astunparse, 4 3 buildPythonPackage, 5 - fetchpatch, 6 - fetchPypi, 4 + fetchFromGitHub, 5 + 6 + # build-system 7 + hatchling, 8 + 9 + # dependencies 7 10 immutabledict, 11 + pytools, 12 + 13 + # optional-dependencies 8 14 matchpy, 9 15 numpy, 16 + 17 + # tests 10 18 pytestCheckHook, 11 - pythonOlder, 12 - pytools, 13 - setuptools, 14 - typing-extensions, 15 19 }: 16 20 17 21 buildPythonPackage rec { ··· 23 19 version = "2024.2.2"; 24 20 pyproject = true; 25 21 26 - disabled = pythonOlder "3.7"; 27 - 28 - src = fetchPypi { 29 - inherit pname version; 30 - hash = "sha256-l2zP8O0bnVrTRxzyuqDQLiMBwevtXld7LgX2M8L1P+w="; 22 + src = fetchFromGitHub { 23 + owner = "inducer"; 24 + repo = "pymbolic"; 25 + tag = "v${version}"; 26 + hash = "sha256-07RWdEPhO+n9/FOvIWe4nm9fGekut9X6Tz4HlIkBSpo="; 31 27 }; 32 28 33 - patches = [ 34 - (fetchpatch { 35 - url = "https://github.com/inducer/pymbolic/commit/cb3d999e4788dad3edf053387b6064adf8b08e19.patch"; 36 - excludes = [ ".github/workflows/ci.yml" ]; 37 - hash = "sha256-P0YjqAo0z0LZMIUTeokwMkfP8vxBXi3TcV4BSFaO1lU="; 38 - }) 39 - ]; 40 - 41 - postPatch = '' 42 - # pytest is a test requirement not a run-time one 43 - substituteInPlace setup.py \ 44 - --replace '"pytest>=2.3",' "" 45 - ''; 46 - 47 - build-system = [ setuptools ]; 29 + build-system = [ hatchling ]; 48 30 49 31 dependencies = [ 50 - astunparse 51 32 immutabledict 52 33 pytools 53 - typing-extensions 54 34 ]; 55 35 56 36 optional-dependencies = { ··· 46 58 47 59 pythonImportsCheck = [ "pymbolic" ]; 48 60 49 - meta = with lib; { 61 + meta = { 50 62 description = "Package for symbolic computation"; 51 63 homepage = "https://documen.tician.de/pymbolic/"; 52 64 changelog = "https://github.com/inducer/pymbolic/releases/tag/v${version}"; 53 - license = licenses.mit; 65 + license = lib.licenses.mit; 54 66 maintainers = [ ]; 55 67 }; 56 68 }