summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2022-07-16 19:49:36 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2022-07-18 16:30:23 -0400
commit8d10015d3a99f1978805a8e4f6848a8ebbe16176 (patch)
tree9a0f290c36109c202b182ef412043be19286e34b
parent099062bd368098303e3eebcb6d90bfc38c92372e (diff)
downloadnixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.tar
nixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.tar.gz
nixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.tar.bz2
nixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.tar.lz
nixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.tar.xz
nixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.tar.zst
nixpkgs-8d10015d3a99f1978805a8e4f6848a8ebbe16176.zip
clhep: init at 2.4.5.3
-rw-r--r--pkgs/development/libraries/physics/clhep/default.nix36
-rw-r--r--pkgs/development/libraries/physics/geant4/default.nix8
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 42 insertions, 4 deletions
diff --git a/pkgs/development/libraries/physics/clhep/default.nix b/pkgs/development/libraries/physics/clhep/default.nix
new file mode 100644
index 00000000000..6f648463c85
--- /dev/null
+++ b/pkgs/development/libraries/physics/clhep/default.nix
@@ -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;
+  };
+}
diff --git a/pkgs/development/libraries/physics/geant4/default.nix b/pkgs/development/libraries/physics/geant4/default.nix
index 3a23d25d875..65735896d65 100644
--- a/pkgs/development/libraries/physics/geant4/default.nix
+++ b/pkgs/development/libraries/physics/geant4/default.nix
@@ -10,7 +10,7 @@
 # Standard build environment with cmake.
 , lib, stdenv, fetchurl, fetchpatch, cmake
 
-, clhep ? null # not packaged currently
+, clhep
 , expat
 , xercesc
 , zlib
@@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
     "-DGEANT4_USE_INVENTOR=${if enableInventor 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_SYSTEM_CLHEP=${if clhep != null then "ON" else "OFF"}"
+    "-DGEANT4_USE_SYSTEM_CLHEP=ON"
     "-DGEANT4_USE_SYSTEM_EXPAT=ON"
     "-DGEANT4_USE_SYSTEM_ZLIB=ON"
     "-DGEANT4_BUILD_MULTITHREADED=${if enableMultiThreading then "ON" else "OFF"}"
@@ -88,11 +88,11 @@ stdenv.mkDerivation rec {
   ];
   dontWrapQtApps = true; # no binaries
 
-  buildInputs = [ libGLU xlibsWrapper libXmu ]
+  buildInputs = [ clhep libGLU xlibsWrapper libXmu ]
     ++ lib.optionals enableInventor [ libXpm coin3d soxt motif ]
     ++ lib.optionals enablePython [ boost_python python3 ];
 
-  propagatedBuildInputs = [ clhep expat xercesc zlib libGL ]
+  propagatedBuildInputs = [ expat xercesc zlib libGL ]
     ++ lib.optionals enableXM [ motif ]
     ++ lib.optionals enableQt [ qtbase ];
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e1bb2dcf0e4..e912dc80f15 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -34343,6 +34343,8 @@ with pkgs;
 
   cernlib = callPackage ../development/libraries/physics/cernlib { };
 
+  clhep = callPackage ../development/libraries/physics/clhep { };
+
   hepmc2 = callPackage ../development/libraries/physics/hepmc2 { };
 
   hepmc3 = callPackage ../development/libraries/physics/hepmc3 {