nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8
9 # dependencies
10 constantdict,
11 pytools,
12 typing-extensions,
13
14 # optional-dependencies
15 matchpy,
16 numpy,
17
18 # tests
19 pytestCheckHook,
20}:
21
22buildPythonPackage (finalAttrs: {
23 pname = "pymbolic";
24 version = "2025.1";
25 pyproject = true;
26
27 src = fetchFromGitHub {
28 owner = "inducer";
29 repo = "pymbolic";
30 tag = "v${finalAttrs.version}";
31 hash = "sha256-cn2EdhMn5qjK854AF5AY4Hv4M5Ib6gPRJk+kQvsFWRk=";
32 };
33
34 build-system = [ hatchling ];
35
36 dependencies = [
37 constantdict
38 pytools
39 typing-extensions
40 ];
41
42 optional-dependencies = {
43 matchpy = [ matchpy ];
44 numpy = [ numpy ];
45 };
46
47 nativeCheckInputs = [
48 pytestCheckHook
49 ]
50 ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
51
52 pythonImportsCheck = [ "pymbolic" ];
53
54 meta = {
55 description = "Package for symbolic computation";
56 homepage = "https://documen.tician.de/pymbolic/";
57 changelog = "https://github.com/inducer/pymbolic/releases/tag/v${finalAttrs.version}";
58 license = lib.licenses.mit;
59 maintainers = with lib.maintainers; [ qbisi ];
60 };
61})