hepmc: init at 2.06.09

+55
+28
pkgs/development/libraries/physics/hepmc/default.nix
··· 1 + { stdenv, fetchurl, cmake }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "hepmc-${version}"; 5 + version = "2.06.09"; 6 + 7 + src = fetchurl { 8 + url = "http://lcgapp.cern.ch/project/simu/HepMC/download/HepMC-${version}.tar.gz"; 9 + sha256 = "020sc7hzy7d6d1i6bs352hdzy5zy5zxkc33cw0jhh8s0jz5281y6"; 10 + }; 11 + 12 + patches = [ ./in_source.patch ]; 13 + buildInputs = [ cmake ]; 14 + 15 + cmakeFlags = [ 16 + "-Dmomentum:STRING=GEV" 17 + "-Dlength:STRING=MM" 18 + ]; 19 + 20 + enableParallelBuilding = true; 21 + 22 + meta = { 23 + description = "The HepMC package is an object oriented event record written in C++ for High Energy Physics Monte Carlo Generators"; 24 + license = stdenv.lib.licenses.gpl2; 25 + homepage = http://lcgapp.cern.ch/project/simu/HepMC/; 26 + platforms = stdenv.lib.platforms.unix; 27 + }; 28 + }
+25
pkgs/development/libraries/physics/hepmc/in_source.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + --- a/CMakeLists.txt 3 + +++ b/CMakeLists.txt 4 + @@ -37,21 +37,6 @@ message(STATUS "default momentum and length are ${HEPMC_DEFAULT_MOM_UNIT} ${HEPM 5 + # find the HepMC cmake modules 6 + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules ${CMAKE_MODULE_PATH}) 7 + 8 + -# make sure we are not building from within the source code directory 9 + -string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" in_source) 10 + -string( REGEX MATCH "${CMAKE_SOURCE_DIR}/" in_source_subdir 11 + -"${CMAKE_BINARY_DIR}") 12 + -if (in_source OR in_source_subdir) 13 + - message(FATAL_ERROR " 14 + -ERROR: In source builds of this project are not allowed. 15 + -A separate build directory is required. 16 + -Please create one and run cmake from the build directory. 17 + -Also note that cmake has just added files to your source code directory. 18 + -We suggest getting a new copy of the source code. 19 + -Otherwise, delete `CMakeCache.txt' and the directory `CMakeFiles'. 20 + - ") 21 + -endif () 22 + - 23 + # build_docs is OFF (false) by default 24 + if ( build_docs ) 25 + message(STATUS "documents WILL be built and installed" )
+2
pkgs/top-level/all-packages.nix
··· 16717 16717 16718 16718 g4py = callPackage ../development/libraries/physics/geant4/g4py { }; 16719 16719 16720 + hepmc = callPackage ../development/libraries/physics/hepmc { }; 16721 + 16720 16722 ### MISC 16721 16723 16722 16724 antimicro = qt5.callPackage ../tools/misc/antimicro { };