From f6eed7be2ef127cdc5e6a0d058511c705d55e63c Mon Sep 17 00:00:00 2001 From: qbisi Date: Tue, 6 May 2025 07:09:16 +0800 Subject: [PATCH] python312Packages.firedrake-fiat: init at 2025.4.0 --- .../python-modules/firedrake-fiat/default.nix | 72 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 74 insertions(+) create mode 100644 pkgs/development/python-modules/firedrake-fiat/default.nix diff --git a/pkgs/development/python-modules/firedrake-fiat/default.nix b/pkgs/development/python-modules/firedrake-fiat/default.nix new file mode 100644 index 000000000000..45fbe6ad8841 --- /dev/null +++ b/pkgs/development/python-modules/firedrake-fiat/default.nix @@ -0,0 +1,72 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchFromBitbucket, + setuptools, + numpy, + scipy, + sympy, + recursivenodes, + symengine, + fenics-ufl, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "firdrake-fiat"; + version = "2025.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "firedrakeproject"; + repo = "fiat"; + tag = version; + hash = "sha256-i+hDpeg4SYRF7OK6uh1p1gVscyuJ4FjmyUUiLR7P7/A="; + }; + + postPatch = + let + fiat-reference-data = fetchFromBitbucket { + owner = "fenics-project"; + repo = "fiat-reference-data"; + rev = "0c8c97f7e4919402129e5ff3b54e3f0b9e902b7c"; + hash = "sha256-vdCkmCkKvLSYACF6MnZ/WuKuCNAoC3uu1A/9m9KwBK8="; + }; + in + '' + ln -s ${fiat-reference-data} test/FIAT/regression/fiat-reference-data + ''; + + build-system = [ setuptools ]; + + dependencies = [ + numpy + scipy + sympy + recursivenodes + fenics-ufl + symengine + ]; + + pythonImportsCheck = [ + "FIAT" + "finat" + "finat.ufl" + "gem" + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pytestFlagsArray = [ + "--skip-download" + ]; + + meta = { + description = "FInite element Automatic Tabulator"; + homepage = "http://fenics-fiat.readthedocs.org/"; + downloadPage = "https://github.com/firedrakeproject/fiat"; + license = lib.licenses.lgpl3Plus; + maintainers = with lib.maintainers; [ qbisi ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 353e1f53da5e..510d978552ec 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4925,6 +4925,8 @@ self: super: with self; { firecrawl-py = callPackage ../development/python-modules/firecrawl-py { }; + firedrake-fiat = callPackage ../development/python-modules/firedrake-fiat { }; + fireflyalgorithm = callPackage ../development/python-modules/fireflyalgorithm { }; firetv = callPackage ../development/python-modules/firetv { };