You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

2 months ago
  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 = ../../../../.;
  21. # Exchange with expression below to build a specific github revision:
  22. # src = fetchFromGitHub {
  23. # owner = "moves-rwth";
  24. # repo = "storm";
  25. # rev = "8332abab58f0c672561f5bbebd585a159852d8cc";
  26. # sha256 = "02ixywhfkxr8xlcizqbysb1yinsjzl6rc0cjlsg8dz8w2r3m6qix";
  27. # };
  28. buildInputs = [ boost carl cln doxygen gmp ginac glpk hwloc l3pp xercesc ]
  29. ++ optional tbbSupport tbb
  30. ++ optional z3Support z3;
  31. nativeBuildInputs = [ autoconf automake cmake ];
  32. cmakeFlags = genCmakeOption tbbSupport "STORM_USE_INTELTBB"
  33. ++ genCmakeOption ltoSupport "STORM_USE_LTO"
  34. ++ optional mathsatSupport "-DMSAT_ROOT=${mathsat}" ;
  35. postPatch = ''
  36. sed -f ${l3ppCmakeSed} -i resources/3rdparty/CMakeLists.txt
  37. '';
  38. meta = with stdenv.lib; {
  39. description = "Probabilistic Model Checker";
  40. homepage = http://www.stormchecker.org;
  41. license = licenses.gpl3;
  42. maintainer = [ maintainers.spacefrogg ];
  43. platforms = platforms.all;
  44. };
  45. }