about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pymbolic/default.nix
blob: de9b8e9ae14c50e39eea5b911c5bf096fa261dbf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, matchpy
, pytestCheckHook
, pythonOlder
, pytools
}:

buildPythonPackage rec {
  pname = "pymbolic";
  version = "2022.2";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-+Cd2lCuzy3Iyn6Hxqito7AnyN9uReMlc/ckqaup87Ik=";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/inducer/pymbolic/commit/cb3d999e4788dad3edf053387b6064adf8b08e19.patch";
      excludes = [ ".github/workflows/ci.yml" ];
      hash = "sha256-P0YjqAo0z0LZMIUTeokwMkfP8vxBXi3TcV4BSFaO1lU=";
    })
  ];

  propagatedBuildInputs = [
    pytools
  ];

  nativeCheckInputs = [
    matchpy
    pytestCheckHook
  ];

  postPatch = ''
    # pytest is a test requirement not a run-time one
      substituteInPlace setup.py \
        --replace '"pytest>=2.3",' ""
  '';

  pythonImportsCheck = [
    "pymbolic"
  ];

  meta = with lib; {
    description = "A package for symbolic computation";
    homepage = "https://documen.tician.de/pymbolic/";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}