-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ stdenv, fetchFromGitHub, cmake, git, gfortran, openmpi, 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 openmpi 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 | ||
]; | ||
|
||
enableParallelBuilding = true; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://www.elmerfem.org/; | ||
description = "A finite element software for multiphysical problems."; | ||
platforms = platforms.unix; | ||
maintainers = [ maintainers.wulfsta ]; | ||
license = licenses.lgpl21; | ||
}; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
pkgs/applications/science/physics/elmerfem/fix-cmake.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --exclude '*~' -ruN A/torch/CMakeLists.txt B/torch/CMakeLists.txt | ||
--- A/fem/tests/CMakeLists.txt 2020-04-23 02:35:03.243388917 -0400 | ||
+++ B/fem/tests/CMakeLists.txt 2018-12-19 20:18:40.671857320 -0400 | ||
@@ -14,7 +14,7 @@ | ||
SET(MESH2D_BIN "${CMAKE_BINARY_DIR}/meshgen2d/src/Mesh2D") | ||
|
||
MACRO(SUBDIRLIST result curdir depth) | ||
set(glob_pattern "*") | ||
- FOREACH(D RANGE 1 depth) | ||
+ FOREACH(D RANGE 1 ${depth}) | ||
FILE(GLOB children RELATIVE ${curdir} ${glob_pattern}) | ||
FOREACH(child ${children}) | ||
IF(IS_DIRECTORY ${curdir}/${child}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters