git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #87816 from helsinki-systems/precice2

precice: 2020-01-20 -> 2.0.2

commit09da70f1f47d9b24c0a7b6a441739c2bb533d12f authorLassulus <github@lassul.us> dateTue 2 Jun 2020, 12:10 (6 years ago) parent53d0dc69d50563
2 files changed+5−125
pkgs/development/libraries/precice/0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch−112 pkgs/development/libraries/precice/default.nix+5−13
pkgs/development/libraries/precice/0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patchdeleted−112
@@ -1,112 +0,0 @@
1−From 078cc28a3ece0dcc4033961090a6e5d6e63b3ec5 Mon Sep 17 00:00:00 2001
2−From: Scriptkiddi <fritz@otlinghaus.it>
3−Date: Sat, 4 Jan 2020 17:59:32 +0100
4−Subject: [PATCH] Fix the install target dirs to use the CMAKE flags
5−
6−---
7− CMakeLists.txt | 27 ++++++++++++++-------------
8− 1 file changed, 14 insertions(+), 13 deletions(-)
9−
10−diff --git a/CMakeLists.txt b/CMakeLists.txt
11−index 96b9d1b5..ff8191ae 100644
12−--- a/CMakeLists.txt
13−+++ b/CMakeLists.txt
14−@@ -5,7 +5,7 @@ project(preCICE VERSION 1.6.1 LANGUAGES CXX)
15−
16− #
17− # Overview of this configuration
18−-#
19−+#
20− # PREAMBLE
21− # Setup Options
22− # Find Mandatory Dependencies
23−@@ -30,6 +30,7 @@ include(CheckCXX11Library)
24− include(CopyTargetProperty)
25− include(XSDKMacros)
26− include(Validation)
27−+include(GNUInstallDirs)
28−
29− # CMake Policies
30−
31−@@ -197,7 +198,7 @@ if(CMAKE_VERSION VERSION_LESS "3.11")
32− endif()
33− endif()
34−
35−-# Add precice as an empty target
36−+# Add precice as an empty target
37− add_library(precice ${preCICE_DUMMY})
38− set_target_properties(precice PROPERTIES
39− # precice is a C++11 project
40−@@ -267,7 +268,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/DetectGitRevision.cmake)
41− configure_file("${PROJECT_SOURCE_DIR}/src/precice/impl/versions.hpp.in" "${PROJECT_BINARY_DIR}/src/precice/impl/versions.hpp" @ONLY)
42−
43− # Includes Configuration
44−-target_include_directories(precice PUBLIC
45−+target_include_directories(precice PUBLIC
46− $<BUILD_INTERFACE:${preCICE_SOURCE_DIR}/src>
47− $<BUILD_INTERFACE:${preCICE_BINARY_DIR}/src>
48− $<INSTALL_INTERFACE:include>
49−@@ -282,7 +283,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/src/sources.cmake)
50− #
51−
52− add_executable(binprecice "src/drivers/main.cpp")
53−-target_link_libraries(binprecice
54−+target_link_libraries(binprecice
55− PRIVATE
56− Threads::Threads
57− precice
58−@@ -365,18 +366,18 @@ include(${CMAKE_CURRENT_LIST_DIR}/src/tests.cmake)
59− # binprecice - the precice binary
60− install(TARGETS precice binprecice
61− EXPORT preciceTargets
62−- LIBRARY DESTINATION lib
63−- ARCHIVE DESTINATION lib
64−- RUNTIME DESTINATION bin
65−- PUBLIC_HEADER DESTINATION include/precice
66−- INCLUDES DESTINATION include/precice
67−+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
68−+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static
69−+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
70−+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/precice
71−+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/precice
72− )
73−
74− if(PRECICE_InstallTest)
75− # Install the testprecice target
76− install(TARGETS testprecice
77− EXPORT preciceTargets
78−- RUNTIME DESTINATION bin
79−+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
80− )
81−
82− # Install the resources necessary for the tests
83−@@ -396,7 +397,7 @@ endif()
84− install(EXPORT preciceTargets
85− FILE preciceTargets.cmake
86− NAMESPACE precice::
87−- DESTINATION lib/cmake/precice
88−+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/precice
89− )
90−
91− # Generate a Package Config File for precice
92−@@ -408,7 +409,7 @@ write_basic_package_version_file("preciceConfigVersion.cmake"
93−
94− # Install the Config and the ConfigVersion files
95− install(FILES "cmake/preciceConfig.cmake" "${preCICE_BINARY_DIR}/preciceConfigVersion.cmake"
96−- DESTINATION lib/cmake/precice
97−+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/precice
98− )
99−
100− # Setup the config in the build directory
101−@@ -477,7 +478,7 @@ configure_file(
102− "lib/pkgconfig/libprecice.pc"
103− @ONLY
104− )
105−-install(DIRECTORY "${preCICE_BINARY_DIR}/lib/pkgconfig"
106−+install(DIRECTORY "${preCICE_BINARY_DIR}/lib/pkgconfig"
107− DESTINATION lib
108− )
109−
110−--
111−2.23.1
112−
pkgs/development/libraries/precice/default.nix+5−13
@@ -1,36 +1,28 @@
1−{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, openmpi, python3, python3Packages }:
1+{ lib, stdenv, fetchFromGitHub, cmake, gcc, boost, eigen, libxml2, openmpi, python3, python3Packages, petsc }:
22
33stdenv.mkDerivation rec {
44 pname = "precice";
5− version = "2020-01-20";
5+ version = "2.0.2";
66 # Todo next release switch back to versioning but for python3 support master is needed
77
88 src = fetchFromGitHub {
99 owner = "precice";
1010 repo = pname;
11− rev = "9f778290416416255fc73a495e962def301648b0";
12− sha256 = "1ij43qjbf1aq3lh91gqpviajc8lyl7qkxfccmj5md5vwf88vjaip";
11+ rev = "v${version}";
12+ sha256 = "1s41wv2077d2gqj0wsxls6wkgdk9cgzcbmk2q43ha08ccq5i3dav";
1313 };
1414
1515 cmakeFlags = [
16+ "-DPRECICE_PETScMapping=OFF"
1617 "-DBUILD_SHARED_LIBS=ON"
17− "-DPETSC=off"
1818 "-DPYTHON_LIBRARIES=${python3.libPrefix}"
1919 "-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}m"
2020 ];
2121
2222 nativeBuildInputs = [ cmake gcc ];
2323 buildInputs = [ boost eigen libxml2 openmpi python3 python3Packages.numpy ];
24− patches = [
25− ./0001-Fix-the-install-target-dirs-to-use-the-CMAKE-flags.patch # CMake Packaging is not perfect upstream, after this PR it is https://github.com/precice/precice/pull/577/files
26− ];
2724 enableParallelBuilding = true;
2825
29− postInstall = ''
30− substituteInPlace "$out"/lib/cmake/precice/preciceTargets.cmake \
31− --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include;' 'INTERFACE_INCLUDE_DIRECTORIES "'$out/include';'
32− ''; # Check if this can be removed after upstream PR 577
33−
3426 meta = {
3527 description = "preCICE stands for Precise Code Interaction Coupling Environment";
3628 license = with lib.licenses; [ gpl3 ];