nixpkgs/pkgs/applications/science/misc/simgrid/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

126 lines
4.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchFromGitLab, cmake, perl, python3, boost
, fortranSupport ? false, gfortran
, buildDocumentation ? false, fig2dev, ghostscript, doxygen
, buildJavaBindings ? false, openjdk
, buildPythonBindings ? true, python3Packages
Update simgrid 3.19.1 -> 3.20 + parallel tests + enable darwin (#42721) * simgrid: 3.19.1 -> 3.20 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/simgrid/versions. These checks were done: - built on NixOS - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpicc passed the binary check. - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpicxx passed the binary check. - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpirun passed the binary check. - Warning: no invocation of /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/tesh had a zero exit code or showed the expected version - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/simgrid-colorizer passed the binary check. - Warning: no invocation of /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/simgrid_update_xml had a zero exit code or showed the expected version - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/simgrid_convert_TI_traces passed the binary check. - Warning: no invocation of /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpimain had a zero exit code or showed the expected version - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/graphicator passed the binary check. - 6 of 9 passed binary check by having a zero exit code. - 4 of 9 passed binary check by having the new version present in output. - found 3.20 with grep in /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20 - directory tree listing: https://gist.github.com/edefc2f1a2e81412484edc2e45986e03 - du listing: https://gist.github.com/a44f7d57537e93152a8e6c569f8ed1ae * simgrid: 3.19.1 -> 3.20 + add darwin - Fix dependencies to enable build on darwin - Add ctest flag to enable parallel testing * Use simpler parallel testing logic because it is already done in nixpkgs/pkgs/stdenv/generic/setup.sh
2018-08-16 00:54:41 +00:00
, modelCheckingSupport ? false, libunwind, libevent, elfutils # Inside elfutils: libelf and libdw
, bmfSupport ? true, eigen
, minimalBindings ? false
, debug ? false
, optimize ? (!debug)
, moreTests ? false
, withoutBin ? false
}:
2021-01-15 13:21:58 +00:00
with lib;
2018-05-24 08:02:12 +00:00
let
2019-09-08 23:38:31 +00:00
optionOnOff = option: if option then "on" else "off";
in
stdenv.mkDerivation rec {
2019-05-13 19:26:09 +00:00
pname = "simgrid";
2022-10-04 18:34:20 +00:00
version = "3.32";
2019-05-13 19:26:09 +00:00
src = fetchFromGitLab {
domain = "framagit.org";
owner = pname;
repo = pname;
rev = "v${version}";
2022-10-04 18:34:20 +00:00
sha256 = "sha256-o25wOROkUm07JPdNTJQcJw6apeoysnjd+YBMHlPpAYI=";
};
propagatedBuildInputs = [ boost ];
nativeBuildInputs = [ cmake perl python3 ]
++ optionals fortranSupport [ gfortran ]
++ optionals buildJavaBindings [ openjdk ]
++ optionals buildPythonBindings [ python3Packages.pybind11 ]
++ optionals buildDocumentation [ fig2dev ghostscript doxygen ]
++ optionals bmfSupport [ eigen ]
++ optionals modelCheckingSupport [ libunwind libevent elfutils ];
outputs = [ "out" ]
++ optionals buildPythonBindings [ "python" ];
# "Release" does not work. non-debug mode is Debug compiled with optimization
cmakeBuildType = "Debug";
2019-10-29 22:21:22 +00:00
cmakeFlags = [
"-Denable_documentation=${optionOnOff buildDocumentation}"
"-Denable_java=${optionOnOff buildJavaBindings}"
"-Denable_python=${optionOnOff buildPythonBindings}"
"-DSIMGRID_PYTHON_LIBDIR=./" # prevents CMake to install in ${python3} dir
"-Denable_msg=${optionOnOff buildJavaBindings}"
2019-10-29 22:21:22 +00:00
"-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"
"-Dminimal-bindings=${optionOnOff minimalBindings}"
2019-10-29 22:21:22 +00:00
"-Denable_smpi_ISP_testsuite=${optionOnOff moreTests}"
"-Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}"
"-Denable_compile_warnings=off"
"-Denable_compile_optimizations=${optionOnOff optimize}"
"-Denable_lto=${optionOnOff optimize}"
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
2019-10-29 22:21:22 +00:00
];
makeFlags = optional debug "VERBOSE=1";
# needed to run tests and to ensure correct shabangs in output scripts
2018-05-24 08:02:12 +00:00
preBuild = ''
patchShebangs ..
'';
# needed by tests (so libsimgrid.so is found)
preConfigure = ''
export LD_LIBRARY_PATH="$PWD/build/lib"
'';
doCheck = true;
preCheck = ''
# prevent the execution of tests known to fail
cat <<EOW >CTestCustom.cmake
SET(CTEST_CUSTOM_TESTS_IGNORE smpi-replay-multiple)
EOW
2021-07-19 12:05:17 +00:00
# make sure tests are built in parallel (this can be long otherwise)
make tests -j $NIX_BUILD_CORES
2018-05-24 08:02:12 +00:00
'';
Update simgrid 3.19.1 -> 3.20 + parallel tests + enable darwin (#42721) * simgrid: 3.19.1 -> 3.20 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/simgrid/versions. These checks were done: - built on NixOS - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpicc passed the binary check. - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpicxx passed the binary check. - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpirun passed the binary check. - Warning: no invocation of /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/tesh had a zero exit code or showed the expected version - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/simgrid-colorizer passed the binary check. - Warning: no invocation of /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/simgrid_update_xml had a zero exit code or showed the expected version - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/simgrid_convert_TI_traces passed the binary check. - Warning: no invocation of /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/smpimain had a zero exit code or showed the expected version - /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20/bin/graphicator passed the binary check. - 6 of 9 passed binary check by having a zero exit code. - 4 of 9 passed binary check by having the new version present in output. - found 3.20 with grep in /nix/store/cvyi6hvgc9rvgrnp7c028xrlzbl7jzb9-simgrid-3.20 - directory tree listing: https://gist.github.com/edefc2f1a2e81412484edc2e45986e03 - du listing: https://gist.github.com/a44f7d57537e93152a8e6c569f8ed1ae * simgrid: 3.19.1 -> 3.20 + add darwin - Fix dependencies to enable build on darwin - Add ctest flag to enable parallel testing * Use simpler parallel testing logic because it is already done in nixpkgs/pkgs/stdenv/generic/setup.sh
2018-08-16 00:54:41 +00:00
postInstall = lib.optionalString withoutBin ''
# remove bin from output if requested.
# having a specific bin output would be cleaner but it does not work currently (circular references)
rm -rf $out/bin
'' + lib.optionalString buildPythonBindings ''
# manually install the python binding if requested.
mkdir -p $python/lib/python${lib.versions.majorMinor python3.version}/site-packages/
cp ./lib/simgrid.cpython*.so $python/lib/python${lib.versions.majorMinor python3.version}/site-packages/
'';
# improve debuggability if requested
hardeningDisable = lib.optionals debug [ "fortify" ];
dontStrip = debug;
2018-05-24 08:02:12 +00:00
meta = {
description = "Framework for the simulation of distributed applications";
2018-05-24 08:02:12 +00: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.
'';
homepage = "https://simgrid.org/";
2018-05-24 08:02:12 +00:00
license = licenses.lgpl2Plus;
2019-06-30 11:42:54 +00:00
maintainers = with maintainers; [ mickours mpoquet ];
2021-03-29 19:19:13 +00:00
platforms = platforms.all;
2022-02-03 09:15:32 +00:00
broken = stdenv.isDarwin;
};
}