35 dijitso = pythonPackages.buildPythonPackage {
39 url = "https://bitbucket.org/fenics-project/dijitso/downloads/dijitso-${version}.tar.gz";
40 sha256 = "1ncgbr0bn5cvv16f13g722a0ipw6p9y6p4iasxjziwsp8kn5x97a";
42 propagatedBuildInputs = [ numpy six ];
43 nativeCheckInputs = [ pytest ];
53 description = "Distributed just-in-time shared library building";
54 homepage = "https://fenicsproject.org/";
55 platforms = lib.platforms.all;
56 license = lib.licenses.lgpl3;
60 fiat = pythonPackages.buildPythonPackage {
64 url = "https://bitbucket.org/fenics-project/fiat/downloads/fiat-${version}.tar.gz";
65 sha256 = "1sbi0fbr7w9g9ajr565g3njxrc3qydqjy3334vmz5xg0rd3106il";
67 propagatedBuildInputs = [ numpy six sympy ];
68 nativeCheckInputs = [ pytest ];
71 # Workaround pytest 4.6.3 issue.
72 # See: https://bitbucket.org/fenics-project/fiat/pull-requests/59
73 rm test/unit/test_quadrature.py
74 rm test/unit/test_reference_element.py
75 rm test/unit/test_fiat.py
77 # Fix `np.float` deprecation in Numpy 1.20
78 grep -lr 'np.float(' test/ | while read -r fn; do
79 substituteInPlace "$fn" \
80 --replace "np.float(" "np.float64("
89 description = "Automatic generation of finite element basis functions";
90 homepage = "https://fenicsproject.org/";
91 platforms = lib.platforms.all;
92 license = lib.licenses.lgpl3;
96 ufl = pythonPackages.buildPythonPackage {
100 url = "https://bitbucket.org/fenics-project/ufl/downloads/ufl-${version}.tar.gz";
101 sha256 = "04daxwg4y9c51sdgvwgmlc82nn0fjw7i2vzs15ckdc7dlazmcfi1";
103 propagatedBuildInputs = [ numpy six ];
104 nativeCheckInputs = [ pytest ];
111 description = "A domain-specific language for finite element variational forms";
112 homepage = "https://fenicsproject.org/";
113 platforms = lib.platforms.all;
114 license = lib.licenses.lgpl3;
118 ffc = pythonPackages.buildPythonPackage {
122 url = "https://bitbucket.org/fenics-project/ffc/downloads/ffc-${version}.tar.gz";
123 sha256 = "1zdg6pziss4va74pd7jjl8sc3ya2gmhpypccmyd8p7c66ji23y2g";
125 nativeBuildInputs = [
128 propagatedBuildInputs = [
137 nativeCheckInputs = [ pytest ];
140 rm test/unit/ufc/finite_element/test_evaluate.py
148 description = "A compiler for finite element variational forms";
149 homepage = "https://fenicsproject.org/";
150 platforms = lib.platforms.all;
151 license = lib.licenses.lgpl3;
154 dolfin = stdenv.mkDerivation {
158 url = "https://bitbucket.org/fenics-project/dolfin/downloads/dolfin-${version}.tar.gz";
159 sha256 = "0kbyi4x5f6j4zpasch0swh0ch81w2h92rqm1nfp3ydi4a93vky33";
163 name = "fix-double-prefix.patch";
164 url = "https://bitbucket.org/josef_kemetmueller/dolfin/commits/328e94acd426ebaf2243c072b806be3379fd4340/raw";
165 sha256 = "1zj7k3y7vsx0hz3gwwlxhq6gdqamqpcw90d4ishwx5ps5ckcsb9r";
168 url = "https://bitbucket.org/fenics-project/dolfin/issues/attachments/1116/fenics-project/dolfin/1602778118.04/1116/0001-Use-__BYTE_ORDER__-instead-of-removed-Boost-endian.h.patch";
169 hash = "sha256-wPaDmPU+jaD3ce3nNEbvM5p8e3zBdLozamLTJ/0ai2c=";
172 # https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=dolfin&id=a965ad934f7b3d49a5e77fa6fb5e3c710ec2163e
174 sed -i '20 a #include <algorithm>' dolfin/geometry/IntersectionConstruction.cpp
175 sed -i '26 a #include <algorithm>' dolfin/mesh/MeshFunction.h
176 sed -i '25 a #include <cstdint>' dolfin/mesh/MeshConnectivity.h
178 propagatedBuildInputs = [
185 nativeBuildInputs = [
213 "-DDOLFIN_CXX_FLAGS=-std=c++11"
214 "-DDOLFIN_AUTO_DETECT_MPI=ON"
215 "-DDOLFIN_ENABLE_CHOLMOD=ON"
216 "-DDOLFIN_ENABLE_DOCS=ON"
217 "-DDOLFIN_ENABLE_HDF5=ON"
218 "-DDOLFIN_ENABLE_MPI=ON"
219 "-DDOLFIN_ENABLE_SCOTCH=ON"
220 "-DDOLFIN_ENABLE_UMFPACK=ON"
221 "-DDOLFIN_ENABLE_ZLIB=ON"
222 "-DDOLFIN_SKIP_BUILD_TESTS=ON" # Otherwise SCOTCH is not found
223 # TODO: Enable the following features
224 "-DDOLFIN_ENABLE_PARMETIS=OFF"
225 "-DDOLFIN_ENABLE_PETSC=OFF"
226 "-DDOLFIN_ENABLE_SLEPC=OFF"
227 "-DDOLFIN_ENABLE_TRILINOS=OFF"
229 installCheckPhase = ''
230 source $out/share/dolfin/dolfin.conf
234 description = "The FEniCS Problem Solving Environment in Python and C++";
235 homepage = "https://fenicsproject.org/";
236 license = lib.licenses.lgpl3;
239 python-dolfin = pythonPackages.buildPythonPackage rec {
242 disabled = pythonPackages.isPy27;
244 sourceRoot = "${pname}-${version}/python";
245 nativeBuildInputs = [
249 dontUseCmakeConfigure = true;
251 export CMAKE_PREFIX_PATH=${pybind11}/share/cmake/pybind11:$CMAKE_PREFIX_PATH
252 substituteInPlace setup.py --replace "pybind11==2.2.4" "pybind11"
253 substituteInPlace dolfin/jit/jit.py \
254 --replace 'pkgconfig.exists("dolfin")' 'pkgconfig.exists("${dolfin}/lib/pkgconfig/dolfin.pc")' \
255 --replace 'pkgconfig.parse("dolfin")' 'pkgconfig.parse("${dolfin}/lib/pkgconfig/dolfin.pc")'
262 propagatedBuildInputs = [
268 pythonPackages.pkgconfig
269 pythonPackages.pybind11
271 doCheck = false; # Tries to orte_ess_init and call ssh to localhost
272 passthru.tests = { inherit (nixosTests) fenics; };
274 description = "Python bindings for the DOLFIN FEM compiler";
275 homepage = "https://fenicsproject.org/";
276 platforms = lib.platforms.all;
277 license = lib.licenses.lgpl3;