Merge pull request #181777 from veprbl/pr/clhep_init

clhep: init at 2.4.5.3
This commit is contained in:
Dmitry Kalinkin 2022-07-19 10:25:57 -04:00 committed by GitHub
commit d57f20b903
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 4 deletions

View file

@ -0,0 +1,36 @@
{ lib
, stdenv
, fetchurl
, cmake
}:
stdenv.mkDerivation rec {
pname = "clhep";
version = "2.4.5.3";
src = fetchurl {
url = "https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-${version}.tgz";
hash = "sha256-RfY+6wl/Av5nuGp9rb8Q1Am0AcKKGj4XLbNiUsMJfBM=";
};
prePatch = ''
cd CLHEP
'';
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "clhep_ensure_out_of_source_build()" ""
'';
nativeBuildInputs = [
cmake
];
meta = with lib; {
description = "Set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra";
homepage = "https://cern.ch/clhep";
license = with licenses; [ gpl3Only lgpl3Only ];
maintainers = with maintainers; [ veprbl ];
platforms = platforms.unix;
};
}

View file

@ -10,7 +10,7 @@
# Standard build environment with cmake. # Standard build environment with cmake.
, lib, stdenv, fetchurl, fetchpatch, cmake , lib, stdenv, fetchurl, fetchpatch, cmake
, clhep ? null # not packaged currently , clhep
, expat , expat
, xercesc , xercesc
, zlib , zlib
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
"-DGEANT4_USE_INVENTOR=${if enableInventor then "ON" else "OFF"}" "-DGEANT4_USE_INVENTOR=${if enableInventor then "ON" else "OFF"}"
"-DGEANT4_USE_PYTHON=${if enablePython then "ON" else "OFF"}" "-DGEANT4_USE_PYTHON=${if enablePython then "ON" else "OFF"}"
"-DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}" "-DGEANT4_USE_RAYTRACER_X11=${if enableRaytracerX11 then "ON" else "OFF"}"
"-DGEANT4_USE_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}" "-DGEANT4_USE_SYSTEM_CLHEP=ON"
"-DGEANT4_USE_SYSTEM_EXPAT=ON" "-DGEANT4_USE_SYSTEM_EXPAT=ON"
"-DGEANT4_USE_SYSTEM_ZLIB=ON" "-DGEANT4_USE_SYSTEM_ZLIB=ON"
"-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}" "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"
@ -88,11 +88,11 @@ stdenv.mkDerivation rec {
]; ];
dontWrapQtApps = true; # no binaries dontWrapQtApps = true; # no binaries
buildInputs = [ libGLU xlibsWrapper libXmu ] buildInputs = [ clhep libGLU xlibsWrapper libXmu ]
++ lib.optionals enableInventor [ libXpm coin3d soxt motif ] ++ lib.optionals enableInventor [ libXpm coin3d soxt motif ]
++ lib.optionals enablePython [ boost_python python3 ]; ++ lib.optionals enablePython [ boost_python python3 ];
propagatedBuildInputs = [ clhep expat xercesc zlib libGL ] propagatedBuildInputs = [ expat xercesc zlib libGL ]
++ lib.optionals enableXM [ motif ] ++ lib.optionals enableXM [ motif ]
++ lib.optionals enableQt [ qtbase ]; ++ lib.optionals enableQt [ qtbase ];

View file

@ -34375,6 +34375,8 @@ with pkgs;
cernlib = callPackage ../development/libraries/physics/cernlib { }; cernlib = callPackage ../development/libraries/physics/cernlib { };
clhep = callPackage ../development/libraries/physics/clhep { };
hepmc2 = callPackage ../development/libraries/physics/hepmc2 { }; hepmc2 = callPackage ../development/libraries/physics/hepmc2 { };
hepmc3 = callPackage ../development/libraries/physics/hepmc3 { hepmc3 = callPackage ../development/libraries/physics/hepmc3 {