forked from mirrors/nixpkgs
6dba41fbcb
Use the attribute mpi to provide a system wide default MPI implementation. The default is openmpi (as before). This now allows for overriding the MPI implentation by using the overlay mechanism. Build all packages with mpich instead of the default openmpi can now be achived like this: self: super: { mpi = super.mpich; } All derivations that have been using "mpi ? null" to provide optional building with MPI have been change in the following way to allow for optional builds with MPI: { ... , mpi , useMpi ? false }
48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, qt4, qwt6_qt4, pkg-config }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "elmerfem";
|
|
version = "8.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "elmercsc";
|
|
repo = "elmerfem";
|
|
rev = "release-${version}";
|
|
sha256 = "0vk31lplxlng173q8jjcpbyj1gaf98jvkqjvi9077d1nslya7vpm";
|
|
};
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
nativeBuildInputs = [ cmake pkg-config git ];
|
|
buildInputs = [ gfortran mpi blas liblapack qt4 qwt6_qt4 ];
|
|
|
|
preConfigure = ''
|
|
patchShebangs ./
|
|
'';
|
|
|
|
storepath = placeholder "out";
|
|
|
|
cmakeFlags = [
|
|
"-DELMER_INSTALL_LIB_DIR=${storepath}/lib"
|
|
"-DWITH_OpenMP:BOOLEAN=TRUE"
|
|
"-DWITH_MPI:BOOLEAN=TRUE"
|
|
"-DWITH_ELMERGUI:BOOLEAN=TRUE"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
"-DCMAKE_OpenGL_GL_PREFERENCE=GLVND"
|
|
];
|
|
|
|
patches = [
|
|
./fix-cmake.patch
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://elmerfem.org/";
|
|
description = "A finite element software for multiphysical problems";
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.wulfsta ];
|
|
license = licenses.lgpl21;
|
|
};
|
|
|
|
}
|