From 099089578cbbadb0d56dcbe7051836863c7556b8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 24 Mar 2025 18:08:00 -0400 Subject: [PATCH 1/3] drop root5 --- pkgs/by-name/ap/apfelgrid/package.nix | 6 +- pkgs/by-name/ap/applgrid/package.nix | 4 +- .../ro/root5/disable_libc_dicts_root5.patch | 27 --- pkgs/by-name/ro/root5/package.nix | 195 ----------------- .../ro/root5/purify_include_paths_root5.patch | 204 ------------------ .../ro/root5/python313-PyCFunction_Call.patch | 14 -- .../ro/root5/root5-python311-fix.patch | 17 -- pkgs/by-name/ro/root5/setup-hook.sh | 19 -- pkgs/by-name/ro/root5/sw_vers_root5.patch | 104 --------- pkgs/by-name/xf/xfitter/package.nix | 34 ++- pkgs/top-level/aliases.nix | 1 + 11 files changed, 22 insertions(+), 603 deletions(-) delete mode 100644 pkgs/by-name/ro/root5/disable_libc_dicts_root5.patch delete mode 100644 pkgs/by-name/ro/root5/package.nix delete mode 100644 pkgs/by-name/ro/root5/purify_include_paths_root5.patch delete mode 100644 pkgs/by-name/ro/root5/python313-PyCFunction_Call.patch delete mode 100644 pkgs/by-name/ro/root5/root5-python311-fix.patch delete mode 100644 pkgs/by-name/ro/root5/setup-hook.sh delete mode 100644 pkgs/by-name/ro/root5/sw_vers_root5.patch diff --git a/pkgs/by-name/ap/apfelgrid/package.nix b/pkgs/by-name/ap/apfelgrid/package.nix index 7ca3c7209973..1ed9f0782e18 100644 --- a/pkgs/by-name/ap/apfelgrid/package.nix +++ b/pkgs/by-name/ap/apfelgrid/package.nix @@ -6,7 +6,8 @@ apfel, applgrid, lhapdf, - root5, + root, + zlib, }: stdenv.mkDerivation rec { @@ -25,7 +26,8 @@ stdenv.mkDerivation rec { apfel applgrid lhapdf - root5 + root + zlib ]; enableParallelBuilding = true; diff --git a/pkgs/by-name/ap/applgrid/package.nix b/pkgs/by-name/ap/applgrid/package.nix index f5ebcf89d724..8c53c52e7cd5 100644 --- a/pkgs/by-name/ap/applgrid/package.nix +++ b/pkgs/by-name/ap/applgrid/package.nix @@ -5,7 +5,7 @@ gfortran, hoppet, lhapdf, - root5, + root, zlib, }: @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ hoppet lhapdf - root5 + root zlib ]; diff --git a/pkgs/by-name/ro/root5/disable_libc_dicts_root5.patch b/pkgs/by-name/ro/root5/disable_libc_dicts_root5.patch deleted file mode 100644 index abd6222847ef..000000000000 --- a/pkgs/by-name/ro/root5/disable_libc_dicts_root5.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt ---- a/cint/ROOT/CMakeLists.txt -+++ b/cint/ROOT/CMakeLists.txt -@@ -47,21 +47,13 @@ set(CINTSTLDLLHEADERS - ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdcxxfunc.h - ) - set(CINTINCDLLNAMES -- stdfunc -+# stdfunc - # stdcxxfunc - ) - set(CINTINCDLLHEADERS -- ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdfunc.h -+# ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdfunc.h - # ${CMAKE_SOURCE_DIR}/cint/cint/lib/stdstrct/stdcxxfunc.h - ) --if(NOT WIN32) -- set(CINTSTLDLLNAMES ${CINTSTLDLLNAMES} valarray) -- set(CINTSTLDLLHEADERS ${CINTSTLDLLHEADERS} ${CINTDLLDIR}/vary.h) -- set(CINTINCDLLNAMES ${CINTINCDLLNAMES} posix ipc) -- set(CINTINCDLLHEADERS ${CINTINCDLLHEADERS} -- ${CMAKE_SOURCE_DIR}/cint/cint/lib/posix/exten.h -- ${CMAKE_SOURCE_DIR}/cint/cint/lib/ipc/ipcif.h) --endif() - - set(CINTBUILDLOADER - vector diff --git a/pkgs/by-name/ro/root5/package.nix b/pkgs/by-name/ro/root5/package.nix deleted file mode 100644 index abffe178a93f..000000000000 --- a/pkgs/by-name/ro/root5/package.nix +++ /dev/null @@ -1,195 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - fetchpatch, - cmake, - pcre, - pkg-config, - python3, - libX11, - libXpm, - libXft, - libXext, - libGLU, - libGL, - zlib, - libxml2, - libxcrypt, - lz4, - xz, - gsl, - xxHash, - noSplash ? false, -}: - -stdenv.mkDerivation rec { - pname = "root"; - version = "5.34.38"; - - src = fetchurl { - url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; - sha256 = "1ln448lszw4d6jmbdphkr2plwxxlhmjkla48vmmq750xc1lxlfrc"; - }; - - nativeBuildInputs = [ - cmake - pkg-config - ]; - buildInputs = - [ - pcre - python3 - zlib - libxml2 - lz4 - xz - gsl - xxHash - libxcrypt - ] - ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ - libX11 - libXpm - libXft - libXext - libGLU - libGL - ]; - - patches = [ - ./sw_vers_root5.patch - - # prevents rootcint from looking in /usr/includes and such - ./purify_include_paths_root5.patch - - # disable dictionary generation for stuff that includes libc headers - # our glibc requires a modern compiler - ./disable_libc_dicts_root5.patch - - (fetchpatch { - name = "root5-gcc9-fix.patch"; - url = "https://github.com/root-project/root/commit/348f30a6a3b5905ef734a7bd318bc0ee8bca6dc9.diff"; - sha256 = "0dvrsrkpacyn5z87374swpy7aciv9a8s6m61b4iqd7a956r67rn3"; - }) - (fetchpatch { - name = "root5-gcc10-fix.patch"; - url = "https://github.com/root-project/root/commit/3c243b18768d3c3501faf3ca4e4acfc071021350.diff"; - sha256 = "1hjmgnp4zx6im8ps78673x0rrhmfyy1nffhgxjlfl1r2z8cq210z"; - }) - (fetchpatch { - name = "root5-python37-fix.patch"; - url = "https://github.com/root-project/root/commit/c75458024082de0cc35b45505c652b8460a9e71b.patch"; - sha256 = "sha256-A5zEjQE9OGPFp/L1HUs4NIdxQMRiwbwCRNWOLN2ENrM="; - }) - # Backport Python 3.11 fix to v5 from v6.26 - # https://github.com/root-project/root/commit/484deb056dacf768aba4954073b41105c431bffc - ./root5-python311-fix.patch - - # Backport Python 3.13 fix to v5 from v6.25 - # https://github.com/root-project/root/commit/9aa67a863482eef8cf50850b9ac3724e35f58781 - ./python313-PyCFunction_Call.patch - ]; - - # https://github.com/root-project/root/issues/13216 - hardeningDisable = [ "fortify3" ]; - - preConfigure = - '' - # binutils 2.37 fixes - fixupList=( - cint/demo/gl/make0 - cint/demo/exception/Makefile - cint/demo/makecint/KRcc/Makefile - cint/demo/makecint/Stub2/Make2 - cint/demo/makecint/Array/Makefile - cint/demo/makecint/DArray/Makefile - cint/demo/makecint/ReadFile/Makefile - cint/demo/makecint/stl/Makefile - cint/demo/makecint/Stub2/Make1 - cint/cint/include/makemat - cint/cint/lib/WildCard/Makefile - cint/cint/include/make.arc - cint/cint/lib/qt/Makefile - cint/cint/lib/pthread/Makefile - graf2d/asimage/src/libAfterImage/Makefile.in - ) - for toFix in "''${fixupList[@]}"; do - substituteInPlace "$toFix" --replace "clq" "cq" - done - - patchShebangs build/unix/ - - # __malloc_hook is deprecated - substituteInPlace misc/memstat/src/TMemStatHook.cxx \ - --replace "defined(R__GNU) && (defined(R__LINUX) || defined(__APPLE__))" \ - "defined(R__GNU) && (defined(__APPLE__))" - - # python 3.12 - substituteInPlace bindings/pyroot/src/PyROOT.h \ - --replace " PyUnicode_GET_SIZE" " PyUnicode_GetLength" \ - --replace " PyUnicode_GetSize" " PyUnicode_GetLength" - '' - # Fix CINTSYSDIR for "build" version of rootcint - # This is probably a bug that breaks out-of-source builds - + '' - substituteInPlace cint/cint/src/loadfile.cxx\ - --replace 'env = "cint";' 'env = "'`pwd`'/cint";' - '' - + lib.optionalString noSplash '' - substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true" - ''; - - cmakeFlags = - [ - "-Drpath=ON" - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DCMAKE_INSTALL_INCLUDEDIR=include" - "-DCMAKE_CXX_FLAGS=-std=c++11" - "-Dalien=OFF" - "-Dbonjour=OFF" - "-Dcastor=OFF" - "-Dchirp=OFF" - "-Ddavix=OFF" - "-Ddcache=OFF" - "-Dfftw3=OFF" - "-Dfitsio=OFF" - "-Dfortran=OFF" - "-Dgfal=OFF" - "-Dgsl_shared=ON" - "-Dgviz=OFF" - "-Dhdfs=OFF" - "-Dkrb5=OFF" - "-Dldap=OFF" - "-Dmathmore=ON" - "-Dmonalisa=OFF" - "-Dmysql=OFF" - "-Dodbc=OFF" - "-Dopengl=ON" - "-Doracle=OFF" - "-Dpgsql=OFF" - "-Dpythia6=OFF" - "-Dpythia8=OFF" - "-Drfio=OFF" - "-Dsqlite=OFF" - "-Dssl=OFF" - "-Dxml=ON" - "-Dxrootd=OFF" - ] - ++ lib.optional ( - (!stdenv.hostPlatform.isDarwin) && (stdenv.cc.libc != null) - ) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"; - - env.NIX_CFLAGS_COMPILE = "-fpermissive"; - - setupHook = ./setup-hook.sh; - - meta = with lib; { - homepage = "https://root.cern.ch/"; - description = "Data analysis framework"; - platforms = platforms.unix; - broken = !stdenv.hostPlatform.isx86_64 || stdenv.cc.isClang or false; - maintainers = with maintainers; [ veprbl ]; - license = licenses.lgpl21; - }; -} diff --git a/pkgs/by-name/ro/root5/purify_include_paths_root5.patch b/pkgs/by-name/ro/root5/purify_include_paths_root5.patch deleted file mode 100644 index 6773603b8ad3..000000000000 --- a/pkgs/by-name/ro/root5/purify_include_paths_root5.patch +++ /dev/null @@ -1,204 +0,0 @@ -diff --git a/cint/cint/src/loadfile.cxx b/cint/cint/src/loadfile.cxx ---- a/cint/cint/src/loadfile.cxx -+++ b/cint/cint/src/loadfile.cxx -@@ -1365,92 +1365,6 @@ int G__statfilename(const char *filenamein, struct stat *statBuf, - } - } - #endif /* G__EDU_VERSION */ -- --#ifdef G__VISUAL -- /********************************************** -- * try /msdev/include -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- workname.Format("/msdev/include/%s%s",filename(),addpost[i2]); -- res = stat( workname, statBuf ); -- if (res==0) { -- if (fullPath) fullPath->Swap(workname); -- return res; -- } -- } --#endif /* G__VISUAL */ -- --#ifdef G__SYMANTEC -- /********************************************** -- * try /sc/include -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- workname.Format("/sc/include/%s%s",filename(),addpost[i2]); -- res = stat( workname, statBuf ); -- if (res==0) { -- if (fullPath) fullPath->Swap(workname); -- return res; -- } -- } --#endif // G__SYMANTEC -- --#ifndef G__WIN32 -- /********************************************** -- * try /usr/include/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- workname.Format("/usr/include/%s%s",filename(),addpost[i2]); -- res = stat( workname, statBuf ); -- if (res==0) { -- if (fullPath) fullPath->Swap(workname); -- return res; -- } -- } --#endif -- --#ifdef __GNUC__ -- /********************************************** -- * try /usr/include/g++/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- workname.Format("/usr/include/g++/%s%s",filename(),addpost[i2]); -- res = stat( workname, statBuf ); -- if (res==0) { -- if (fullPath) fullPath->Swap(workname); -- return res; -- } -- } --#endif /* __GNUC__ */ -- --#ifndef G__WIN32 -- /* #ifdef __hpux */ -- /********************************************** -- * try /usr/include/CC/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- workname.Format("/usr/include/CC/%s%s",filename(),addpost[i2]); -- res = stat( workname, statBuf ); -- if (res==0) { -- if (fullPath) fullPath->Swap(workname); -- return res; -- } -- } --#endif -- --#ifndef G__WIN32 -- /********************************************** -- * try /usr/include/codelibs/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- workname.Format("/usr/include/codelibs/%s%s" -- ,filename(),addpost[i2]); -- res = stat( workname, statBuf ); -- if (res==0) { -- if (fullPath) fullPath->Swap(workname); -- return res; -- } -- } --#endif - } - return -1; - } -@@ -1960,107 +1874,6 @@ int G__loadfile(const char *filenamein) - } - if(G__ifile.fp) break; - #endif /* G__EDU_VERSION */ -- --#ifdef G__VISUAL -- /********************************************** -- * try /msdev/include -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- G__snprintf(G__ifile.name,G__MAXFILENAME,"/msdev/include/%s%s",filename(),addpost[i2]); --#ifndef G__WIN32 -- G__ifile.fp = fopen(G__ifile.name,"r"); --#else -- G__ifile.fp = fopen(G__ifile.name,"rb"); --#endif -- G__globalcomp=G__store_globalcomp; -- } -- if(G__ifile.fp) break; --#endif /* G__VISUAL */ -- --#ifdef G__SYMANTEC -- /********************************************** -- * try /sc/include -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- G__snprintf(G__ifile.name,G__MAXFILENAME,"/sc/include/%s%s",filename(),addpost[i2]); --#ifndef G__WIN32 -- G__ifile.fp = fopen(G__ifile.name,"r"); --#else -- G__ifile.fp = fopen(G__ifile.name,"rb"); --#endif -- G__globalcomp=G__store_globalcomp; -- } -- if(G__ifile.fp) break; --#endif /* G__SYMANTEC */ -- --#ifndef G__WIN32 -- /********************************************** -- * try /usr/include/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/%s%s",filename(),addpost[i2]); --#ifndef G__WIN32 -- G__ifile.fp = fopen(G__ifile.name,"r"); --#else -- G__ifile.fp = fopen(G__ifile.name,"rb"); --#endif -- G__globalcomp=G__store_globalcomp; -- } -- if(G__ifile.fp) break; --#endif -- --#ifdef __GNUC__ -- /********************************************** -- * try /usr/include/g++/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/g++/%s%s",filename(),addpost[i2]); --#ifndef G__WIN32 -- G__ifile.fp = fopen(G__ifile.name,"r"); --#else -- G__ifile.fp = fopen(G__ifile.name,"rb"); --#endif -- G__globalcomp=G__store_globalcomp; -- } -- if(G__ifile.fp) break; --#endif /* __GNUC__ */ -- --#ifndef G__WIN32 --/* #ifdef __hpux */ -- /********************************************** -- * try /usr/include/CC/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/CC/%s%s",filename(),addpost[i2]); --#ifndef G__WIN32 -- G__ifile.fp = fopen(G__ifile.name,"r"); --#else -- G__ifile.fp = fopen(G__ifile.name,"rb"); --#endif -- G__globalcomp=G__store_globalcomp; -- } -- if(G__ifile.fp) break; --/* #endif __hpux */ --#endif -- --#ifndef G__WIN32 --/* #ifdef __hpux */ -- /********************************************** -- * try /usr/include/codelibs/filename -- **********************************************/ -- if('\0'!=G__cintsysdir[0]) { -- G__snprintf(G__ifile.name,G__MAXFILENAME,"/usr/include/codelibs/%s%s" -- ,filename(),addpost[i2]); --#ifndef G__WIN32 -- G__ifile.fp = fopen(G__ifile.name,"r"); --#else -- G__ifile.fp = fopen(G__ifile.name,"rb"); --#endif -- G__globalcomp=G__store_globalcomp; -- } -- if(G__ifile.fp) break; --/* #endif __hpux */ --#endif - } - } - diff --git a/pkgs/by-name/ro/root5/python313-PyCFunction_Call.patch b/pkgs/by-name/ro/root5/python313-PyCFunction_Call.patch deleted file mode 100644 index a447b4760d0d..000000000000 --- a/pkgs/by-name/ro/root5/python313-PyCFunction_Call.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/bindings/pyroot/src/TCustomPyTypes.cxx -+++ b/bindings/pyroot/src/TCustomPyTypes.cxx -@@ -240,7 +240,11 @@ - // the function is globally shared, so set and reset its "self" (ok, b/c of GIL) - Py_INCREF( self ); - func->m_self = self; -+#if PY_VERSION_HEX >= 0x03090000 -+ PyObject* result = PyObject_Call( (PyObject*)func, args, kw ); -+#else - PyObject* result = PyCFunction_Call( (PyObject*)func, args, kw ); -+#endif - func->m_self = 0; - Py_DECREF( self ); - Py_DECREF( args ); diff --git a/pkgs/by-name/ro/root5/root5-python311-fix.patch b/pkgs/by-name/ro/root5/root5-python311-fix.patch deleted file mode 100644 index 3005b3a73f9b..000000000000 --- a/pkgs/by-name/ro/root5/root5-python311-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/bindings/pyroot/src/MethodProxy.cxx b/bindings/pyroot/src/MethodProxy.cxx ---- a/bindings/pyroot/src/MethodProxy.cxx -+++ b/bindings/pyroot/src/MethodProxy.cxx -@@ -4,10 +4,10 @@ - // Bindings - #include "PyROOT.h" - #include "structmember.h" // from Python --#if PY_VERSION_HEX >= 0x02050000 --#include "code.h" // from Python --#else -+#if PY_VERSION_HEX < 0x02050000 - #include "compile.h" // from Python -+#elif PY_VERSION_HEX < 0x030b0000 -+#include "code.h" // from Python - #endif - #ifndef CO_NOFREE - // python2.2 does not have CO_NOFREE defined diff --git a/pkgs/by-name/ro/root5/setup-hook.sh b/pkgs/by-name/ro/root5/setup-hook.sh deleted file mode 100644 index 7affd21012eb..000000000000 --- a/pkgs/by-name/ro/root5/setup-hook.sh +++ /dev/null @@ -1,19 +0,0 @@ -thisroot () { - # Workaround thisroot.sh dependency on man - if [ -z "${MANPATH-}" ]; then - MANPATH=: - fi - local oldOpts="-u" - shopt -qo nounset || oldOpts="+u" - set +u - source @out@/bin/thisroot.sh - set "$oldOpts" -} - -postHooks+=(thisroot) - -addRootIncludePath() { - addToSearchPath ROOT_INCLUDE_PATH $1/include -} - -addEnvHooks "$targetOffset" addRootIncludePath diff --git a/pkgs/by-name/ro/root5/sw_vers_root5.patch b/pkgs/by-name/ro/root5/sw_vers_root5.patch deleted file mode 100644 index f044bed91f3d..000000000000 --- a/pkgs/by-name/ro/root5/sw_vers_root5.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff --git a/build/unix/compiledata.sh b/build/unix/compiledata.sh ---- a/build/unix/compiledata.sh -+++ b/build/unix/compiledata.sh -@@ -49,7 +49,7 @@ fi - - if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \ - [ "$ARCH" = "macosxicc" ]; then -- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` -+ macosx_minor=7 - SOEXT="so" - if [ $macosx_minor -ge 5 ]; then - if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then -diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake ---- a/cmake/modules/SetUpMacOS.cmake -+++ b/cmake/modules/SetUpMacOS.cmake -@@ -12,25 +12,11 @@ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/X11R6) - #--------------------------------------------------------------------------------------------------------- - - if (CMAKE_SYSTEM_NAME MATCHES Darwin) -- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion" -- COMMAND cut -d . -f 1-2 -- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) -- MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}") -- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion" -- COMMAND cut -d . -f 2 -- OUTPUT_VARIABLE MACOSX_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) -- -- if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) - set(libcxx ON CACHE BOOL "Build using libc++" FORCE) -- endif() - -- if(${MACOSX_MINOR} GREATER 4) - #TODO: check haveconfig and rpath -> set rpath true - #TODO: check Thread, define link command - #TODO: more stuff check configure script -- execute_process(COMMAND /usr/sbin/sysctl machdep.cpu.extfeatures OUTPUT_VARIABLE SYSCTL_OUTPUT) -- if(${SYSCTL_OUTPUT} MATCHES 64) -- MESSAGE(STATUS "Found a 64bit system") - set(ROOT_ARCHITECTURE macosx64) - SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") - SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -m64") -@@ -38,28 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") - SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m64") -- else(${SYSCTL_OUTPUT} MATCHES 64) -- MESSAGE(STATUS "Found a 32bit system") -- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") -- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") -- SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m32") -- endif(${SYSCTL_OUTPUT} MATCHES 64) -- endif() -- -- if(MACOSX_VERSION VERSION_GREATER 10.6) -- set(MACOSX_SSL_DEPRECATED ON) -- endif() -- if(MACOSX_VERSION VERSION_GREATER 10.7) -- set(MACOSX_ODBC_DEPRECATED ON) -- endif() -- if(MACOSX_VERSION VERSION_GREATER 10.8) -- set(MACOSX_GLU_DEPRECATED ON) -- set(MACOSX_KRB5_DEPRECATED ON) -- set(MACOSX_TMPNAM_DEPRECATED ON) -- endif() -- if(MACOSX_VERSION VERSION_GREATER 10.9) -- set(MACOSX_LDAP_DEPRECATED ON) -- endif() - - if (CMAKE_COMPILER_IS_GNUCXX) - message(STATUS "Found GNU compiler collection") -@@ -132,7 +96,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) - endif() - - #---Set Linker flags---------------------------------------------------------------------- -- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${MACOSX_VERSION} -Wl,-rpath,@loader_path/../lib") -+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../lib") - - - else (CMAKE_SYSTEM_NAME MATCHES Darwin) -diff --git a/config/root-config.in b/config/root-config.in ---- a/config/root-config.in -+++ b/config/root-config.in -@@ -391,7 +391,7 @@ macosxicc) - ;; - macosx64) - # MacOS X with gcc (GNU cc v4.x) in 64 bit mode -- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` -+ macosx_minor=7 - # cannot find the one linked to libGraf if relocated after built - if [ $macosx_minor -le 4 ]; then - rootlibs="$rootlibs -lfreetype" -diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt ---- a/cint/ROOT/CMakeLists.txt -+++ b/cint/ROOT/CMakeLists.txt -@@ -232,9 +232,7 @@ foreach(_name ${CINTINCDLLNAMES}) - DEPENDS ${HEADER_OUTPUT_PATH}/systypes.h - ) - -- if(MACOSX_MINOR GREATER 4) - set(_ExtraFlag "-D__DARWIN_UNIX03") -- endif() - - add_custom_command(OUTPUT ${OutFileName} - COMMAND cint_tmp -K -w1 -z${_name} -n${OutFileName} -D__MAKECINT__ -DG__MAKECINT ${_ExtraFlag} -c-2 -Z0 ${InFileName} ${AdditionalHeaderFiles} ${CMAKE_BINARY_DIR}/cint/cint/include/sys/types.h ${CMAKE_SOURCE_DIR}/cint/cint/lib/posix/posix.h \ No newline at end of file diff --git a/pkgs/by-name/xf/xfitter/package.nix b/pkgs/by-name/xf/xfitter/package.nix index 821676260249..6aa1e893a05e 100644 --- a/pkgs/by-name/xf/xfitter/package.nix +++ b/pkgs/by-name/xf/xfitter/package.nix @@ -43,25 +43,21 @@ stdenv.mkDerivation { gfortran pkg-config ]; - buildInputs = - [ - apfel - blas - ceres-solver - lhapdf - lapack - libyaml - root - qcdnum - gsl - yaml-cpp - zlib - ] - ++ lib.optionals ("5" == lib.versions.major root.version) [ - apfelgrid - applgrid - ] - ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc; + buildInputs = [ + apfel + apfelgrid + applgrid + blas + ceres-solver + lhapdf + lapack + libyaml + root + qcdnum + gsl + yaml-cpp + zlib + ] ++ lib.optional (stdenv.hostPlatform.libc == "glibc") libtirpc; env.NIX_CFLAGS_COMPILE = lib.optionalString ( stdenv.hostPlatform.libc == "glibc" diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 67263043db84..05ec44e3fbe6 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1748,6 +1748,7 @@ mapAliases { rl_json = tclPackages.rl_json; # Added 2025-05-03 rockbox_utility = rockbox-utility; # Added 2022-03-17 rocmPackages_5 = throw "ROCm 5 has been removed in favor of newer versions"; # Added 2025-02-18 + root5 = throw "root5 has been removed from nixpkgs because it's a legacy version"; # Added 2025-07-17 rnix-hashes = throw "'rnix-hashes' has been removed due to lack of upstream maintenance"; # Added 2025-01-25 rpiboot-unstable = throw "'rpiboot-unstable' has been renamed to/replaced by 'rpiboot'"; # Converted to throw 2024-10-17 rr-unstable = rr; # Added 2022-09-17 From f6dc8d6b1b829c6c5a5724634a15db3759ea4795 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 24 Mar 2025 18:09:43 -0400 Subject: [PATCH 2/3] applgrid: move to pkgs/by-name, drop unneeded Cocoa input --- pkgs/by-name/ap/applgrid/package.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/by-name/ap/applgrid/package.nix b/pkgs/by-name/ap/applgrid/package.nix index 8c53c52e7cd5..54ea06eb8e29 100644 --- a/pkgs/by-name/ap/applgrid/package.nix +++ b/pkgs/by-name/ap/applgrid/package.nix @@ -28,9 +28,7 @@ stdenv.mkDerivation rec { zlib ]; - patches = [ - ./bad_code.patch - ]; + patches = [ ./bad_code.patch ]; preConfigure = '' From 3bd7be5bcb4c2bdd2b3f482fd15804b67f42088e Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 24 Mar 2025 18:18:19 -0400 Subject: [PATCH 3/3] applgrid: 1.4.70 -> 1.6.27 --- pkgs/by-name/ap/applgrid/bad_code.patch | 50 ------------------------- pkgs/by-name/ap/applgrid/package.nix | 14 ++++--- 2 files changed, 8 insertions(+), 56 deletions(-) delete mode 100644 pkgs/by-name/ap/applgrid/bad_code.patch diff --git a/pkgs/by-name/ap/applgrid/bad_code.patch b/pkgs/by-name/ap/applgrid/bad_code.patch deleted file mode 100644 index e90000efe2db..000000000000 --- a/pkgs/by-name/ap/applgrid/bad_code.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/appl_grid/appl_grid.h b/appl_grid/appl_grid.h -index 5059622..a0651c9 100644 ---- a/appl_grid/appl_grid.h -+++ b/appl_grid/appl_grid.h -@@ -56,7 +56,7 @@ public: - class exception : public std::exception { - public: - exception(const std::string& s) { std::cerr << what() << " " << s << std::endl; }; -- exception(std::ostream& s) { std::cerr << what() << " " << s << std::endl; }; -+ exception(std::ostream& s) { s << what() << " " << std::endl; }; - virtual const char* what() const throw() { return "appl::grid::exception"; } - }; - -diff --git a/appl_grid/appl_pdf.h b/appl_grid/appl_pdf.h -index c71fd84..2525527 100644 ---- a/appl_grid/appl_pdf.h -+++ b/appl_grid/appl_pdf.h -@@ -51,7 +51,7 @@ public: - class exception : public std::exception { - public: - exception(const std::string& s="") { std::cerr << what() << " " << s << std::endl; }; -- exception(std::ostream& s) { std::cerr << what() << " " << s << std::endl; }; -+ exception(std::ostream& s) { s << " " << std::endl; }; - const char* what() const throw() { return "appl::appl_pdf::exception "; } - }; - -diff --git a/src/appl_igrid.h b/src/appl_igrid.h -index d25288e..be354df 100644 ---- a/src/appl_igrid.h -+++ b/src/appl_igrid.h -@@ -52,7 +52,7 @@ private: - class exception { - public: - exception(const std::string& s) { std::cerr << s << std::endl; }; -- exception(std::ostream& s) { std::cerr << s << std::endl; }; -+ exception(std::ostream& s) { s << std::endl; }; - }; - - typedef double (igrid::*transform_t)(double) const; -diff --git a/src/lumi_pdf.cxx b/src/lumi_pdf.cxx ---- a/src/lumi_pdf.cxx -+++ b/src/lumi_pdf.cxx -@@ -235,6 +235,6 @@ void lumi_pdf::write(const std::string& filename) const { - // std::string lumi_pdf::summary(std::ostream& s=std::cout) const { - std::string lumi_pdf::summary() const { - std::stringstream s; -- s << "lumi_pdf::lumi_pdf() " << s << "\tsize " << m_combinations.size() << " lookup size " << m_lookup.size() << " " << this; -+ s << "lumi_pdf::lumi_pdf() " << "\tsize " << m_combinations.size() << " lookup size " << m_lookup.size() << " " << this; - return s.str(); - } diff --git a/pkgs/by-name/ap/applgrid/package.nix b/pkgs/by-name/ap/applgrid/package.nix index 54ea06eb8e29..66353890cda8 100644 --- a/pkgs/by-name/ap/applgrid/package.nix +++ b/pkgs/by-name/ap/applgrid/package.nix @@ -11,13 +11,17 @@ stdenv.mkDerivation rec { pname = "applgrid"; - version = "1.4.70"; + version = "1.6.27"; src = fetchurl { url = "https://www.hepforge.org/archive/applgrid/${pname}-${version}.tgz"; - sha256 = "1yw9wrk3vjv84kd3j4s1scfhinirknwk6xq0hvj7x2srx3h93q9p"; + hash = "sha256-h+ZNGj33FIwg4fOCyfGJrUKM2vDDQl76JcLhtboAOtc="; }; + postPatch = '' + sed -i appl_grid/serialise_base.h -e '1i#include ' + ''; + nativeBuildInputs = [ gfortran ]; # For some reason zlib was only needed after bump to gfortran8 @@ -28,16 +32,14 @@ stdenv.mkDerivation rec { zlib ]; - patches = [ ./bad_code.patch ]; - preConfigure = '' substituteInPlace src/Makefile.in \ - --replace "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib" + --replace-fail "-L\$(subst /libgfortran.a, ,\$(FRTLIB) )" "-L${gfortran.cc.lib}/lib" '' + (lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace src/Makefile.in \ - --replace "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib" + --replace-fail "gfortran -print-file-name=libgfortran.a" "gfortran -print-file-name=libgfortran.dylib" ''); enableParallelBuilding = false; # broken