1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 numpy, 8 cffi, 9 fenics-ufl, 10 fenics-basix, 11 sympy, 12 numba, 13 pytestCheckHook, 14 addBinToPathHook, 15}: 16 17buildPythonPackage rec { 18 pname = "fenics-ffcx"; 19 version = "0.9.0"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "fenics"; 24 repo = "ffcx"; 25 tag = "v${version}"; 26 hash = "sha256-eAV//RLbrxyhqgbZ2DiR7qML7xfgPn0/Seh+2no0x8w="; 27 }; 28 29 pythonRelaxDeps = [ 30 "fenics-ufl" 31 ]; 32 33 build-system = [ 34 setuptools 35 ]; 36 37 dependencies = [ 38 numpy 39 cffi 40 setuptools 41 fenics-ufl 42 fenics-basix 43 ]; 44 45 pythonImportsCheck = [ 46 "ffcx" 47 ]; 48 49 nativeCheckInputs = [ 50 sympy 51 numba 52 pytestCheckHook 53 addBinToPathHook 54 ]; 55 56 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=unused-command-line-argument"; 57 58 meta = { 59 homepage = "https://fenicsproject.org"; 60 downloadPage = "https://github.com/fenics/ffcx"; 61 description = "FEniCSx Form Compiler"; 62 changelog = "https://github.com/fenics/ffcx/releases/tag/${src.tag}"; 63 mainProgram = "ffcx"; 64 license = with lib.licenses; [ 65 unlicense 66 lgpl3Plus 67 ]; 68 maintainers = with lib.maintainers; [ qbisi ]; 69 }; 70}