1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchFromBitbucket,
6 setuptools,
7 numpy,
8 scipy,
9 sympy,
10 recursivenodes,
11 symengine,
12 fenics-ufl,
13 pytestCheckHook,
14}:
15
16buildPythonPackage rec {
17 pname = "firdrake-fiat";
18 version = "2025.4.0";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "firedrakeproject";
23 repo = "fiat";
24 tag = version;
25 hash = "sha256-i+hDpeg4SYRF7OK6uh1p1gVscyuJ4FjmyUUiLR7P7/A=";
26 };
27
28 postPatch =
29 let
30 fiat-reference-data = fetchFromBitbucket {
31 owner = "fenics-project";
32 repo = "fiat-reference-data";
33 rev = "0c8c97f7e4919402129e5ff3b54e3f0b9e902b7c";
34 hash = "sha256-vdCkmCkKvLSYACF6MnZ/WuKuCNAoC3uu1A/9m9KwBK8=";
35 };
36 in
37 ''
38 ln -s ${fiat-reference-data} test/FIAT/regression/fiat-reference-data
39 '';
40
41 build-system = [ setuptools ];
42
43 dependencies = [
44 numpy
45 scipy
46 sympy
47 recursivenodes
48 fenics-ufl
49 symengine
50 ];
51
52 pythonImportsCheck = [
53 "FIAT"
54 "finat"
55 "finat.ufl"
56 "gem"
57 ];
58
59 nativeCheckInputs = [ pytestCheckHook ];
60
61 pytestFlags = [
62 "--skip-download"
63 ];
64
65 meta = {
66 description = "FInite element Automatic Tabulator";
67 homepage = "http://fenics-fiat.readthedocs.org/";
68 downloadPage = "https://github.com/firedrakeproject/fiat";
69 license = lib.licenses.lgpl3Plus;
70 maintainers = with lib.maintainers; [ qbisi ];
71 };
72}