2019-05-13 21:26:09 +02:00
|
|
|
{ stdenv, fetchFromGitLab, cmake, perl, python3, boost, valgrind
|
2017-11-27 17:50:25 +01:00
|
|
|
# Optional requirements
|
|
|
|
# Lua 5.3 needed and not available now
|
|
|
|
#, luaSupport ? false, lua5
|
|
|
|
, fortranSupport ? false, gfortran
|
|
|
|
, buildDocumentation ? false, transfig, ghostscript, doxygen
|
|
|
|
, buildJavaBindings ? false, openjdk
|
2018-08-16 02:54:41 +02:00
|
|
|
, modelCheckingSupport ? false, libunwind, libevent, elfutils # Inside elfutils: libelf and libdw
|
2017-11-27 17:50:25 +01:00
|
|
|
, debug ? false
|
|
|
|
, moreTests ? false
|
2014-08-12 12:09:46 +02:00
|
|
|
}:
|
2010-06-01 12:13:29 +02:00
|
|
|
|
2018-05-24 10:02:12 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
2019-09-09 01:38:31 +02:00
|
|
|
optionOnOff = option: if option then "on" else "off";
|
2017-11-27 17:50:25 +01:00
|
|
|
in
|
2010-06-01 12:13:29 +02:00
|
|
|
|
2017-11-27 17:50:25 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-13 21:26:09 +02:00
|
|
|
pname = "simgrid";
|
2019-10-14 16:06:51 +02:00
|
|
|
version = "3.24";
|
2017-11-27 17:50:25 +01:00
|
|
|
|
2019-05-13 21:26:09 +02:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "framagit.org";
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2019-05-13 18:58:27 +02:00
|
|
|
rev = "v${version}";
|
2019-10-14 16:06:51 +02:00
|
|
|
sha256 = "1r9zgfx5npjw4mk0ywxx07jyi1m1b1i06j0m60n3dsrz75492x6m";
|
2010-06-01 12:13:29 +02:00
|
|
|
};
|
|
|
|
|
2018-08-16 02:54:41 +02:00
|
|
|
nativeBuildInputs = [ cmake perl python3 boost valgrind ]
|
2018-05-24 10:02:12 +02:00
|
|
|
++ optionals fortranSupport [ gfortran ]
|
|
|
|
++ optionals buildJavaBindings [ openjdk ]
|
|
|
|
++ optionals buildDocumentation [ transfig ghostscript doxygen ]
|
2018-08-16 02:54:41 +02:00
|
|
|
++ optionals modelCheckingSupport [ libunwind libevent elfutils ];
|
2017-11-27 17:50:25 +01:00
|
|
|
|
|
|
|
#buildInputs = optional luaSupport lua5;
|
2010-06-01 12:13:29 +02:00
|
|
|
|
2018-05-24 10:02:12 +02:00
|
|
|
# Make it so that libsimgrid.so will be found when running programs from
|
|
|
|
# the build dir.
|
|
|
|
preConfigure = ''
|
2017-11-27 17:50:25 +01:00
|
|
|
export LD_LIBRARY_PATH="$PWD/build/lib"
|
2018-05-24 10:02:12 +02:00
|
|
|
'';
|
2010-06-01 12:13:29 +02:00
|
|
|
|
2017-11-27 17:50:25 +01:00
|
|
|
# Release mode is not supported in SimGrid
|
|
|
|
cmakeBuildType = "Debug";
|
|
|
|
|
|
|
|
# Disable/Enable functionality
|
|
|
|
# Note: those packages are not packaged in Nixpkgs yet so some options
|
|
|
|
# are disabled:
|
|
|
|
# - papi: for enable_smpi_papi
|
|
|
|
# - ns3: for enable_ns3
|
|
|
|
# - lua53: for enable_lua
|
|
|
|
#
|
|
|
|
# For more information see:
|
2019-05-13 18:58:27 +02:00
|
|
|
# https://simgrid.org/doc/3.22/Installing_SimGrid.html#simgrid-compilation-options)
|
2017-11-27 17:50:25 +01:00
|
|
|
cmakeFlags= ''
|
2018-05-24 10:02:12 +02:00
|
|
|
-Denable_documentation=${optionOnOff buildDocumentation}
|
|
|
|
-Denable_java=${optionOnOff buildJavaBindings}
|
|
|
|
-Denable_fortran=${optionOnOff fortranSupport}
|
|
|
|
-Denable_model-checking=${optionOnOff modelCheckingSupport}
|
|
|
|
-Denable_ns3=off
|
|
|
|
-Denable_lua=off
|
|
|
|
-Denable_lib_in_jar=off
|
|
|
|
-Denable_maintainer_mode=off
|
|
|
|
-Denable_mallocators=on
|
|
|
|
-Denable_debug=on
|
|
|
|
-Denable_smpi=on
|
|
|
|
-Denable_smpi_ISP_testsuite=${optionOnOff moreTests}
|
|
|
|
-Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}
|
|
|
|
-Denable_compile_warnings=${optionOnOff debug}
|
|
|
|
-Denable_compile_optimizations=${optionOnOff (!debug)}
|
|
|
|
-Denable_lto=${optionOnOff (!debug)}
|
|
|
|
'';
|
|
|
|
# -Denable_lua=${optionOnOff luaSupport}
|
|
|
|
# -Denable_smpi_papi=${optionOnOff moreTests}
|
2017-11-27 17:50:25 +01:00
|
|
|
|
|
|
|
makeFlags = optionalString debug "VERBOSE=1";
|
2010-06-01 12:13:29 +02:00
|
|
|
|
2018-05-24 10:02:12 +02:00
|
|
|
# Some Perl scripts are called to generate test during build which
|
|
|
|
# is before the fixupPhase, so do this manualy here:
|
|
|
|
preBuild = ''
|
|
|
|
patchShebangs ..
|
|
|
|
'';
|
2010-12-17 18:48:12 +01:00
|
|
|
|
2017-11-27 17:50:25 +01:00
|
|
|
doCheck = true;
|
2018-08-16 02:54:41 +02:00
|
|
|
|
2019-05-14 18:27:51 +02:00
|
|
|
# Prevent the execution of tests known to fail.
|
|
|
|
preCheck = ''
|
|
|
|
cat <<EOW >CTestCustom.cmake
|
|
|
|
SET(CTEST_CUSTOM_TESTS_IGNORE smpi-replay-multiple)
|
|
|
|
EOW
|
2018-05-24 10:02:12 +02:00
|
|
|
'';
|
2018-08-16 02:54:41 +02:00
|
|
|
|
2017-11-27 17:50:25 +01:00
|
|
|
enableParallelBuilding = true;
|
2010-06-01 12:13:29 +02:00
|
|
|
|
2018-05-24 10:02:12 +02:00
|
|
|
meta = {
|
2017-11-27 17:50:25 +01:00
|
|
|
description = "Framework for the simulation of distributed applications";
|
2018-05-24 10:02:12 +02:00
|
|
|
longDescription = ''
|
|
|
|
SimGrid is a toolkit that provides core functionalities for the
|
|
|
|
simulation of distributed applications in heterogeneous distributed
|
|
|
|
environments. The specific goal of the project is to facilitate
|
|
|
|
research in the area of distributed and parallel application
|
|
|
|
scheduling on distributed computing platforms ranging from simple
|
|
|
|
network of workstations to Computational Grids.
|
|
|
|
'';
|
2019-03-04 22:42:46 +01:00
|
|
|
homepage = https://simgrid.org/;
|
2018-05-24 10:02:12 +02:00
|
|
|
license = licenses.lgpl2Plus;
|
2019-06-30 13:42:54 +02:00
|
|
|
maintainers = with maintainers; [ mickours mpoquet ];
|
2018-10-31 20:25:30 +01:00
|
|
|
platforms = ["x86_64-linux"];
|
2010-06-01 12:13:29 +02:00
|
|
|
};
|
|
|
|
}
|