Skip to content

Commit

Permalink
root: 6.28.10 -> 6.30.02 (NixOS#274348)
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Dec 17, 2023
1 parent 2f18b0f commit d245890
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
18 changes: 13 additions & 5 deletions pkgs/applications/science/misc/root/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@

stdenv.mkDerivation rec {
pname = "root";
version = "6.28.10";
version = "6.30.02";

passthru = {
tests = import ./tests { inherit callPackage; };
};

src = fetchurl {
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
hash = "sha256-adb962B+ayC9AsdX+mIXAkwLYTLB6bHf9Nhdmiu35R4=";
hash = "sha256-eWWkVtGtHuDV/kdpv1qP7Cka9oTtk9sPMICpw2JDUYM=";
};

nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
Expand Down Expand Up @@ -110,6 +110,13 @@ stdenv.mkDerivation rec {

patches = [
./sw_vers.patch

# Fix for builtin_llvm=OFF
# https://github.com/root-project/root/pull/14238
(fetchpatch {
url = "https://github.com/root-project/root/commit/1477d3adebf27a19f3a8b85f21c27a0a5649c7ff.diff";
hash = "sha256-g+FqXBTWXA7t7F/rMarnmOK2014oCNnNJbHhjH+Tvjw=";
})
];

preConfigure = ''
Expand All @@ -121,7 +128,7 @@ stdenv.mkDerivation rec {
substituteInPlace cmake/modules/SearchInstalledSoftware.cmake \
--replace 'set(lcgpackages ' '#set(lcgpackages '
substituteInPlace interpreter/llvm/src/tools/clang/tools/driver/CMakeLists.txt \
substituteInPlace interpreter/llvm-project/clang/tools/driver/CMakeLists.txt \
--replace 'add_clang_symlink(''${link} clang)' ""
# Don't require textutil on macOS
Expand All @@ -136,8 +143,8 @@ stdenv.mkDerivation rec {
substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
'' + lib.optionalString stdenv.isDarwin ''
# Eliminate impure reference to /System/Library/PrivateFrameworks
substituteInPlace core/CMakeLists.txt \
--replace "-F/System/Library/PrivateFrameworks" ""
substituteInPlace core/macosx/CMakeLists.txt \
--replace "-F/System/Library/PrivateFrameworks " ""
'' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
MACOSX_DEPLOYMENT_TARGET=10.16
'';
Expand Down Expand Up @@ -184,6 +191,7 @@ stdenv.mkDerivation rec {
"-Dsqlite=OFF"
"-Dssl=ON"
"-Dtmva=ON"
"-Dtmva-pymva=OFF"
"-Dvdt=OFF"
"-Dwebgui=ON"
"-Dxml=ON"
Expand Down
13 changes: 6 additions & 7 deletions pkgs/applications/science/misc/root/sw_vers.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
--- a/cmake/modules/SetUpMacOS.cmake
+++ b/cmake/modules/SetUpMacOS.cmake
@@ -28,17 +28,10 @@ if(CMAKE_VERSION VERSION_LESS 3.14.4)
endif()
@@ -8,17 +8,10 @@
set(ROOT_PLATFORM macosx)

if (CMAKE_SYSTEM_NAME MATCHES Darwin)
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
Expand All @@ -19,7 +19,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
#TODO: check haveconfig and rpath -> set rpath true
#TODO: check Thread, define link command
#TODO: more stuff check configure script
@@ -57,22 +50,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
@@ -37,22 +30,7 @@
SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -m64")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
Expand All @@ -42,7 +42,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake

if (CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -W -Wshadow -Wall -Woverloaded-virtual -fsigned-char -fno-common")
@@ -130,7 +108,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
@@ -96,7 +74,6 @@
endif()

#---Set Linker flags----------------------------------------------------------------------
Expand All @@ -53,7 +53,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
diff a/config/root-config.in b/config/root-config.in
--- a/config/root-config.in
+++ b/config/root-config.in
@@ -312,12 +312,6 @@ macosxicc)
@@ -307,12 +307,6 @@
;;
macosx64|macosxarm64)
# MacOS X with gcc (GNU cc v4.x) in 64 bit mode
Expand All @@ -66,15 +66,14 @@ diff a/config/root-config.in b/config/root-config.in
auxcflags="${cxxversionflag} -m64"
auxldflags="-m64"
auxlibs="-lm -ldl"
@@ -378,18 +372,11 @@ freebsd* | openbsd* | linux*)
@@ -387,17 +381,11 @@
done
;;
macosx*)
- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
auxcflags="-pthread $auxcflags"
auxlibs="-lpthread $auxlibs"
- else
- auxcflags="-D_REENTRANT $auxcflags"
- auxlibs="-lpthread $auxlibs"
- fi
for f in $features ; do
Expand Down

0 comments on commit d245890

Please sign in to comment.