From aedfb59c87eccee02b873d46953c4bdc5bf37815 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 28 Aug 2021 03:03:35 -0400 Subject: [PATCH 1/3] root: 6.24.02 -> 6.24.06 --- pkgs/applications/science/misc/root/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 8aa9006d5232..e68b8b310f10 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -37,11 +37,11 @@ stdenv.mkDerivation rec { pname = "root"; - version = "6.24.02"; + version = "6.24.06"; src = fetchurl { url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; - sha256 = "sha256-BQfhCV4nnMxyQPZR0llmAkMlF5+oWhJZtpS1ZyOtfBw="; + sha256 = "sha256-kH9p9LrKHk8w7rSXlZjKdZm2qoA8oEboDiW2u6oO9SI="; }; nativeBuildInputs = [ makeWrapper cmake pkg-config git ]; From 95b2d74bc53621460e651d53e0d7de3ec8411fc5 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 28 Aug 2021 03:04:39 -0400 Subject: [PATCH 2/3] root: re-enable unvendored LLVM --- .../science/misc/root/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index e68b8b310f10..c3c5928ce6c4 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, fetchpatch , makeWrapper , cmake , git @@ -15,6 +16,7 @@ , libGLU , libGL , libxml2 +, llvm_9 , lz4 , xz , pcre @@ -53,6 +55,7 @@ stdenv.mkDerivation rec { zlib zstd libxml2 + llvm_9 lz4 xz gsl @@ -71,8 +74,23 @@ stdenv.mkDerivation rec { patches = [ ./sw_vers.patch + + # Fix builtin_llvm=OFF support + (fetchpatch { + url = "https://github.com/root-project/root/commit/0cddef5d3562a89fe254e0036bb7d5ca8a5d34d2.diff"; + excludes = [ "interpreter/cling/tools/plugins/clad/CMakeLists.txt" ]; + sha256 = "sha256-VxWUbxRHB3O6tERFQdbGI7ypDAZD3sjSi+PYfu1OAbM="; + }) ]; + # 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 \ @@ -99,6 +117,7 @@ stdenv.mkDerivation rec { "-DCMAKE_CXX_STANDARD=17" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_INCLUDEDIR=include" + "-Dbuiltin_llvm=OFF" "-Dbuiltin_nlohmannjson=OFF" "-Dbuiltin_openui5=OFF" "-Dalien=OFF" From 0ec2acf51f2f6e7dabc64ad03c92b2391d604c44 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 1 Sep 2021 09:09:25 -0400 Subject: [PATCH 3/3] root: build with -Dimt=ON --- pkgs/applications/science/misc/root/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index c3c5928ce6c4..4ac416908132 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -31,6 +31,7 @@ , libjpeg , libtiff , libpng +, tbb , Cocoa , CoreSymbolication , OpenGL @@ -67,6 +68,7 @@ stdenv.mkDerivation rec { libpng nlohmann_json python.pkgs.numpy + tbb ] ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] ++ lib.optionals (stdenv.isDarwin) [ Cocoa CoreSymbolication OpenGL ] @@ -131,7 +133,7 @@ stdenv.mkDerivation rec { "-Dfftw3=OFF" "-Dfitsio=OFF" "-Dfortran=OFF" - "-Dimt=OFF" + "-Dimt=ON" "-Dgfal=OFF" "-Dgviz=OFF" "-Dhdfs=OFF"