51 lines
1.4 KiB

  1. { stdenv, fetchFromGitHub, writeText, autoconf, automake, cmake
  2. , boost, carl, cln, doxygen, gmp, ginac, glpk, hwloc, l3pp, xercesc
  3. , ltoSupport ? true
  4. , mathsatSupport ? false, mathsat
  5. , tbbSupport ? false, tbb
  6. , z3Support ? true, z3
  7. }:
  8. let
  9. l3ppCmakeSed = writeText "l3pp-sed" ''
  10. 8,27d
  11. 28i\
  12. set(l3pp_INCLUDE "${l3pp}/include/")
  13. 30d
  14. '';
  15. inherit (stdenv.lib) optional singleton;
  16. genCmakeOption = bool: name:
  17. singleton "-D${name}=${if bool then "on" else "off"}";
  18. in stdenv.mkDerivation {
  19. name = "storm-git";
  20. src = fetchFromGitHub {
  21. owner = "moves-rwth";
  22. repo = "storm";
  23. rev = "8332abab58f0c672561f5bbebd585a159852d8cc";
  24. sha256 = "02ixywhfkxr8xlcizqbysb1yinsjzl6rc0cjlsg8dz8w2r3m6qix";
  25. };
  26. buildInputs = [ boost carl cln doxygen gmp ginac glpk hwloc l3pp xercesc ]
  27. ++ optional tbbSupport tbb
  28. ++ optional z3Support z3;
  29. nativeBuildInputs = [ autoconf automake cmake ];
  30. cmakeFlags = genCmakeOption tbbSupport "STORM_USE_INTELTBB"
  31. ++ genCmakeOption ltoSupport "STORM_USE_LTO"
  32. ++ optional mathsatSupport "-DMSAT_ROOT=${mathsat}" ;
  33. postPatch = ''
  34. sed -f ${l3ppCmakeSed} -i resources/3rdparty/CMakeLists.txt
  35. '';
  36. meta = with stdenv.lib; {
  37. description = "Probabilistic Model Checker";
  38. homepage = http://www.stormchecker.org;
  39. license = licenses.gpl3;
  40. maintainer = [ maintainers.spacefrogg ];
  41. platforms = platforms.all;
  42. };
  43. }