Skip to content

Commit

Permalink
root: 6.26.10 -> 6.28.06 (#215187)
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Sep 4, 2023
1 parent 278796c commit 3c15fee
Showing 1 changed file with 14 additions and 39 deletions.
53 changes: 14 additions & 39 deletions pkgs/applications/science/misc/root/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, lib
, callPackage
, fetchurl
, fetchpatch
, makeWrapper
, cmake
, coreutils
Expand All @@ -14,6 +13,7 @@
, gnugrep
, gnused
, gsl
, gtest
, lapack
, libX11
, libXpm
Expand All @@ -23,7 +23,7 @@
, libGL
, libxcrypt
, libxml2
, llvm_9
, llvm_13
, lsof
, lz4
, xz
Expand Down Expand Up @@ -55,31 +55,17 @@
, noSplash ? false
}:

let

_llvm_9 = llvm_9.overrideAttrs (prev: {
patches = (prev.patches or [ ]) ++ [
(fetchpatch {
url = "https://github.com/root-project/root/commit/a9c961cf4613ff1f0ea50f188e4a4b0eb749b17d.diff";
stripLen = 3;
hash = "sha256-LH2RipJICEDWOr7JzX5s0QiUhEwXNMFEJihYKy9qWpo=";
})
];
});

in

stdenv.mkDerivation rec {
pname = "root";
version = "6.26.10";
version = "6.28.06";

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

src = fetchurl {
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
hash = "sha256-jla+w5cQQBeqVPnrVU3noaE0R0/gs7sPQ6cPxPq9Yl8=";
hash = "sha256-rztnO5rKOTpcmuG/huqyZyqvGEG2WMXG56MKuTxYZTM=";
};

nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
Expand All @@ -97,10 +83,11 @@ stdenv.mkDerivation rec {
lapack
libxcrypt
libxml2
_llvm_9
llvm_13
lz4
xz
gsl
gtest
openblas
openssl
xxHash
Expand All @@ -122,27 +109,16 @@ stdenv.mkDerivation rec {

patches = [
./sw_vers.patch
] ++ lib.optionals (python.pkgs.pythonAtLeast "3.11") [
# Fix build against Python 3.11
(fetchpatch {
url = "https://github.com/root-project/root/commit/484deb056dacf768aba4954073b41105c431bffc.patch";
hash = "sha256-4qur2e3SxMIPgOg4IjlvuULR2BObuP7xdvs+LmNT2/s=";
})
];

# Fix build against vanilla LLVM 9
postPatch = ''
sed \
-e '/#include "llvm.*RTDyldObjectLinkingLayer.h"/i#define private protected' \
-e '/#include "llvm.*RTDyldObjectLinkingLayer.h"/a#undef private' \
-i interpreter/cling/lib/Interpreter/IncrementalJIT.h
'';

preConfigure = ''
rm -rf builtins/*
substituteInPlace cmake/modules/SearchInstalledSoftware.cmake \
--replace 'set(lcgpackages ' '#set(lcgpackages '
substituteInPlace interpreter/llvm/src/tools/clang/tools/driver/CMakeLists.txt \
--replace 'add_clang_symlink(''${link} clang)' ""
# Don't require textutil on macOS
: > cmake/modules/RootCPack.cmake
Expand All @@ -167,6 +143,8 @@ stdenv.mkDerivation rec {
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-Dbuiltin_llvm=OFF"
"-Dbuiltin_freetype=OFF"
"-Dbuiltin_gtest=OFF"
"-Dbuiltin_nlohmannjson=OFF"
"-Dbuiltin_openui5=OFF"
"-Dalien=OFF"
Expand Down Expand Up @@ -240,23 +218,20 @@ stdenv.mkDerivation rec {
# but it also need to support Bash-less POSIX shell like dash,
# as they are mentioned in `thisroot.sh`.
# `thisroot.sh` would include commands `lsof` and `procps` since ROOT 6.28.
# See https://github.com/root-project/root/pull/10332
patchRcPathPosix "$out/bin/thisroot.sh" "${lib.makeBinPath [
coreutils # dirname tail
gnugrep # grep
gnused # sed
lsof # lsof # for ROOT (>=6.28)
lsof # lsof
man # manpath
procps # ps # for ROOT (>=6.28)
procps # ps
which # which
]}"
patchRcPathCsh "$out/bin/thisroot.csh" "${lib.makeBinPath [
coreutils
gnugrep
gnused
lsof # lsof # for ROOT (>=6.28)
lsof # lsof
man
which
]}"
Expand Down

0 comments on commit 3c15fee

Please sign in to comment.