@@ -10,42 +10,37 @@
1010, moreTests ? false
1111}:
1212
13−# helpers for options
14−let optionals = stdenv.lib.optionals;
15− optionalString = stdenv.lib.optionalString;
16− optionOnOff = option: "${if option then "on" else "off"}";
13+with stdenv.lib;
14+
15+let
16+ optionOnOff = option: "${if option then "on" else "off"}";
17+ urlVersion = replaceStrings ["."] ["_"];
1718in
1819
1920stdenv.mkDerivation rec {
20− major_version = "3";
21− minor_version = "17";
22− version = "v${major_version}.${minor_version}";
23− tagged_version = "${major_version}_${minor_version}";
24− name = "simgrid";
21+ name = "simgrid-${version}";
22+ version = "3.17";
2523
2624 src = fetchFromGitHub {
2725 owner = "simgrid";
2826 repo = "simgrid";
29− rev = "v3_17";
27+ rev = "v${urlVersion version}";
3028 sha256 = "0ffs9w141qhw571jsa9sch1cnr332vs4sgj6dsiij2mc24m6wpb4";
31− #rev = "master";
32− #sha256 = "0qvh1jzc2lpnp8234kjx1x4g1a5kfdn6kb15vhk160qgvj98nyqm";
3329 };
3430
35− nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind]
36− ++ optionals fortranSupport [gfortran]
37− ++ optionals buildJavaBindings [openjdk]
38− ++ optionals buildDocumentation [transfig ghostscript doxygen]
39− ++ optionals modelCheckingSupport [libunwind libevent];
31+ nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind ]
32+ ++ optionals fortranSupport [ gfortran ]
33+ ++ optionals buildJavaBindings [ openjdk ]
34+ ++ optionals buildDocumentation [ transfig ghostscript doxygen ]
35+ ++ optionals modelCheckingSupport [ libunwind libevent ];
4036
4137 #buildInputs = optional luaSupport lua5;
4238
43− preConfigure =
44− # Make it so that libsimgrid.so will be found when running programs from
45− # the build dir.
46− ''
39+ # Make it so that libsimgrid.so will be found when running programs from
40+ # the build dir.
41+ preConfigure = ''
4742 export LD_LIBRARY_PATH="$PWD/build/lib"
48− '';
43+ '';
4944
5045 # Release mode is not supported in SimGrid
5146 cmakeBuildType = "Debug";
@@ -60,58 +55,57 @@ stdenv.mkDerivation rec {
6055 # For more information see:
6156 # http://simgrid.gforge.inria.fr/simgrid/latest/doc/install.html#install_cmake_list
6257 cmakeFlags= ''
63− -Denable_documentation=${optionOnOff buildDocumentation}
64− -Denable_java=${optionOnOff buildJavaBindings}
65− -Denable_fortran=${optionOnOff fortranSupport}
66− -Denable_model-checking=${optionOnOff modelCheckingSupport}
67− -Denable_ns3=off
68− -Denable_lua=off
69− -Denable_lib_in_jar=off
70− -Denable_maintainer_mode=off
71− -Denable_mallocators=on
72− -Denable_debug=on
73− -Denable_smpi=on
74− -Denable_smpi_ISP_testsuite=${optionOnOff moreTests}
75− -Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}
76− -Denable_compile_warnings=${optionOnOff debug}
77− -Denable_compile_optimizations=${optionOnOff (!debug)}
78− -Denable_lto=${optionOnOff (!debug)}
79− '';
80− #-Denable_lua=${optionOnOff luaSupport}
81− #-Denable_smpi_papi=${optionOnOff moreTests}
58+ -Denable_documentation=${optionOnOff buildDocumentation}
59+ -Denable_java=${optionOnOff buildJavaBindings}
60+ -Denable_fortran=${optionOnOff fortranSupport}
61+ -Denable_model-checking=${optionOnOff modelCheckingSupport}
62+ -Denable_ns3=off
63+ -Denable_lua=off
64+ -Denable_lib_in_jar=off
65+ -Denable_maintainer_mode=off
66+ -Denable_mallocators=on
67+ -Denable_debug=on
68+ -Denable_smpi=on
69+ -Denable_smpi_ISP_testsuite=${optionOnOff moreTests}
70+ -Denable_smpi_MPICH3_testsuite=${optionOnOff moreTests}
71+ -Denable_compile_warnings=${optionOnOff debug}
72+ -Denable_compile_optimizations=${optionOnOff (!debug)}
73+ -Denable_lto=${optionOnOff (!debug)}
74+ '';
75+ # -Denable_lua=${optionOnOff luaSupport}
76+ # -Denable_smpi_papi=${optionOnOff moreTests}
8277
8378 makeFlags = optionalString debug "VERBOSE=1";
8479
85− preBuild =
86− ''
87− # Some perl scripts are called to generate test during build which
88− # is before the fixupPhase of nix, so do this manualy here:
89− patchShebangs ..
90− '';
80+ # Some Perl scripts are called to generate test during build which
81+ # is before the fixupPhase, so do this manualy here:
82+ preBuild = ''
83+ patchShebangs ..
84+ '';
9185
9286 doCheck = true;
87+
9388 checkPhase = ''
9489 runHook preCheck
95−
9690 ctest --output-on-failure -E smpi-replay-multiple
97−
9891 runHook postCheck
99− '';
92+ '';
93+
10094 enableParallelBuilding = true;
10195
102− meta = with stdenv.lib; {
96+ meta = {
10397 description = "Framework for the simulation of distributed applications";
104− longDescription =
105− '' SimGrid is a toolkit that provides core functionalities for the
106− simulation of distributed applications in heterogeneous distributed
107− environments. The specific goal of the project is to facilitate
108− research in the area of distributed and parallel application
109− scheduling on distributed computing platforms ranging from simple
110− network of workstations to Computational Grids.
111− '';
98+ longDescription = ''
99+ SimGrid is a toolkit that provides core functionalities for the
100+ simulation of distributed applications in heterogeneous distributed
101+ environments. The specific goal of the project is to facilitate
102+ research in the area of distributed and parallel application
103+ scheduling on distributed computing platforms ranging from simple
104+ network of workstations to Computational Grids.
105+ '';
112106 homepage = http://simgrid.gforge.inria.fr/;
107+ license = licenses.lgpl2Plus;
113108 maintainers = with maintainers; [ mickours ];
114109 platforms = platforms.x86_64;
115− license = licenses.lgpl2Plus;
116110 };
117111}