git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107335 from veprbl/pr/root_6_20_08

root: 6.18.04 -> 6.22.06, don't build vendored LLVM

commit8bee208bf8400bd9f8959dc441b0af682a9e2dba authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateFri 1 Jan 2021, 12:28 (6 years ago) parent1e9dee0ffcf3a1
7 files changed+76−48
pkgs/applications/science/misc/root/default.nix+16−7 pkgs/applications/science/misc/root/sw_vers.patch+21−33 pkgs/development/libraries/glew/1.10.nix+3−4 pkgs/development/libraries/glew/default.nix+3−2 pkgs/development/libraries/libAfterImage/default.nix+25 pkgs/development/libraries/physics/yoda/default.nix+2 pkgs/top-level/all-packages.nix+6−2
pkgs/applications/science/misc/root/default.nix+16−7
@@ -1,19 +1,20 @@
1−{ stdenv, lib, fetchurl, makeWrapper, cmake, gl2ps, gsl, libX11, libXpm, libXft
2−, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre, pkgconfig, python, xxHash
3−, zlib
1+{ stdenv, lib, fetchurl, makeWrapper, cmake, ftgl, gl2ps, glew, gsl, llvm_5
2+, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre
3+, pkgconfig, python, xxHash, zlib, zstd
4+, libAfterImage, giflib, libjpeg, libtiff, libpng
45, Cocoa, OpenGL, noSplash ? false }:
56
67stdenv.mkDerivation rec {
78 pname = "root";
8− version = "6.18.04";
9+ version = "6.22.06";
910
1011 src = fetchurl {
1112 url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
12− sha256 = "196ghma6g5a7sqz52wyjkgvmh4hj4vqwppm0zwdypy33hgy8anii";
13+ sha256 = "0mqvj42nax0bmz8h83jjlwjm3xxjy1n0n10inc8csip9ly28fs64";
1314 };
1415
1516 nativeBuildInputs = [ makeWrapper cmake pkgconfig ];
16− buildInputs = [ gl2ps pcre zlib libxml2 lz4 lzma gsl xxHash python.pkgs.numpy ]
17+ buildInputs = [ ftgl gl2ps glew pcre zlib zstd llvm_5 libxml2 lz4 lzma gsl xxHash libAfterImage giflib libjpeg libtiff libpng python.pkgs.numpy ]
1718 ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
1819 ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
1920 ;
@@ -38,6 +39,7 @@ stdenv.mkDerivation rec {
3839 "-DCMAKE_INSTALL_INCLUDEDIR=include"
3940 "-Dalien=OFF"
4041 "-Dbonjour=OFF"
42+ "-Dbuiltin_llvm=OFF"
4143 "-Dcastor=OFF"
4244 "-Dchirp=OFF"
4345 "-Dclad=OFF"
@@ -69,7 +71,14 @@ stdenv.mkDerivation rec {
6971 "-Dxrootd=OFF"
7072 ]
7173 ++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include"
72− ++ stdenv.lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks";
74+ ++ stdenv.lib.optionals stdenv.isDarwin [
75+ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
76+ "-DCMAKE_DISABLE_FIND_PACKAGE_Python2=TRUE"
77+
78+ # fatal error: module map file '/nix/store/<hash>-Libsystem-osx-10.12.6/include/module.modulemap' not found
79+ # fatal error: could not build module '_Builtin_intrinsics'
80+ "-Druntime_cxxmodules=OFF"
81+ ];
7382
7483 enableParallelBuilding = true;
7584
pkgs/applications/science/misc/root/sw_vers.patch+21−33
@@ -1,19 +1,7 @@
1−diff a/build/unix/compiledata.sh b/build/unix/compiledata.sh
2−--- a/build/unix/compiledata.sh
3−+++ b/build/unix/compiledata.sh
4−@@ -47,7 +47,7 @@ fi
5−
6− if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \
7− [ "$ARCH" = "macosxicc" ]; then
8−- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
9−+ macosx_minor=12
10− SOEXT="so"
11− if [ $macosx_minor -ge 5 ]; then
12− if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then
131diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
142--- a/cmake/modules/SetUpMacOS.cmake
153+++ b/cmake/modules/SetUpMacOS.cmake
16−@@ -2,17 +2,8 @@ set(ROOT_ARCHITECTURE macosx)
4+@@ -8,17 +8,10 @@ set(ROOT_ARCHITECTURE macosx)
175 set(ROOT_PLATFORM macosx)
186
197 if (CMAKE_SYSTEM_NAME MATCHES Darwin)
@@ -21,8 +9,8 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
219- COMMAND cut -d . -f 1-2
2210- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
2311-
24−- MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}")
25−-
12+ MESSAGE(STATUS "Found a macOS system ${MACOSX_VERSION}")
13+
2614- if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
2715 set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
2816- endif()
@@ -31,7 +19,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
3119 #TODO: check haveconfig and rpath -> set rpath true
3220 #TODO: check Thread, define link command
3321 #TODO: more stuff check configure script
34−@@ -25,23 +16,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
22+@@ -37,23 +30,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
3523 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
3624 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
3725 SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
@@ -56,7 +44,7 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
5644
5745 if (CMAKE_COMPILER_IS_GNUCXX)
5846 message(STATUS "Found GNU compiler collection")
59−@@ -104,7 +79,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
47+@@ -115,7 +92,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
6048 endif()
6149
6250 #---Set Linker flags----------------------------------------------------------------------
@@ -67,33 +55,33 @@ diff a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
6755diff a/config/root-config.in b/config/root-config.in
6856--- a/config/root-config.in
6957+++ b/config/root-config.in
70−@@ -306,12 +306,6 @@ macosxicc)
71− auxlibs="-lm -ldl"
58+@@ -312,12 +312,6 @@ macosxicc)
7259 ;;
73− macosx64)
74−- # MacOS X with gcc (GNU cc v4.x) in 64 bit mode
60+ macosx64|macosxarm64)
61+ # MacOS X with gcc (GNU cc v4.x) in 64 bit mode
62+- macosx_major=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1 | sed -e 's/^[[:space:]]*//'`
7563- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
7664- # cannot find the one linked to libGraf if relocated after built
77−- if [ $macosx_minor -le 4 ]; then
65+- if [ $macosx_major -eq 10 -a $macosx_minor -le 4 ]; then
7866- rootlibs="$rootlibs -lfreetype"
7967- fi
8068 auxcflags="${cxxversionflag} -m64"
8169 auxldflags="-m64"
8270 auxlibs="-lm -ldl"
83−@@ -375,18 +369,11 @@ freebsd* | openbsd* | linux*)
71+@@ -378,18 +372,11 @@ freebsd* | openbsd* | linux*)
72+ done
73+ ;;
8474 macosx*)
75+- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
76+ auxcflags="-pthread $auxcflags"
77+ auxlibs="-lpthread $auxlibs"
78+- else
79+- auxcflags="-D_REENTRANT $auxcflags"
80+- auxlibs="-lpthread $auxlibs"
81+- fi
8582 for f in $features ; do
86− if test "x$f" = "xthread" ; then
87−- if [ $macosx_minor -ge 5 ]; then
88− auxcflags="-pthread $auxcflags"
89− auxlibs="-lpthread $auxlibs"
90−- else
91−- auxcflags="-D_REENTRANT $auxcflags"
92−- auxlibs="-lpthread $auxlibs"
93−- fi
94− fi
9583 if test "x$f" = "xrpath" ; then
96−- if [ $macosx_minor -ge 5 ]; then
84+- if [ \( $macosx_major -eq 10 -a $macosx_minor -ge 5 \) -o $macosx_major -gt 10 ]; then
9785 auxlibs="-Wl,-rpath,$libdir $auxlibs"
9886- fi
9987 fi
pkgs/development/libraries/glew/1.10.nix+3−4
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
2−, AGL ? null
2+, AGL, OpenGL
33}:
44
55with stdenv.lib;
@@ -12,9 +12,8 @@ stdenv.mkDerivation rec {
1212 sha256 = "01zki46dr5khzlyywr3cg615bcal32dazfazkf360s1znqh17i4r";
1313 };
1414
15− buildInputs = [ xlibsWrapper libXmu libXi ]
16− ++ optionals stdenv.isDarwin [ AGL ];
17− propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h
15+ buildInputs = if stdenv.isDarwin then [ AGL ] else [ xlibsWrapper libXmu libXi ];
16+ propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
1817
1918 patchPhase = ''
2019 sed -i 's|lib64|lib|' config/Makefile.linux
pkgs/development/libraries/glew/default.nix+3−2
@@ -1,4 +1,5 @@
11{ stdenv, fetchurl, libGLU, xlibsWrapper, libXmu, libXi
2+, OpenGL
23}:
34
45with stdenv.lib;
@@ -13,8 +14,8 @@ stdenv.mkDerivation rec {
1314
1415 outputs = [ "bin" "out" "dev" "doc" ];
1516
16− buildInputs = [ xlibsWrapper libXmu libXi ];
17− propagatedBuildInputs = [ libGLU ]; # GL/glew.h includes GL/glu.h
17+ buildInputs = optionals (!stdenv.isDarwin) [ xlibsWrapper libXmu libXi ];
18+ propagatedBuildInputs = if stdenv.isDarwin then [ OpenGL ] else [ libGLU ]; # GL/glew.h includes GL/glu.h
1819
1920 patchPhase = ''
2021 sed -i 's|lib64|lib|' config/Makefile.linux
pkgs/development/libraries/libAfterImage/default.nixnew file+25
@@ -0,0 +1,25 @@
1+{ stdenv, fetchurl, zlib }:
2+
3+stdenv.mkDerivation {
4+ pname = "libAfterImage";
5+ version = "1.20";
6+
7+ src = fetchurl {
8+ name = "libAfterImage-1.20.tar.bz2";
9+ urls = [
10+ "https://sourceforge.net/projects/afterstep/files/libAfterImage/1.20/libAfterImage-1.20.tar.bz2/download"
11+ "ftp://ftp.afterstep.org/stable/libAfterImage/libAfterImage-1.20.tar.bz2"
12+ ];
13+ sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf";
14+ };
15+
16+ buildInputs = [ zlib ];
17+
18+ meta = with stdenv.lib; {
19+ homepage = "http://www.afterstep.org/afterimage/";
20+ description = "A generic image manipulation library";
21+ platforms = platforms.unix;
22+ maintainers = [ maintainers.veprbl ];
23+ license = licenses.lgpl21;
24+ };
25+}
pkgs/development/libraries/physics/yoda/default.nix+2
@@ -39,5 +39,7 @@ stdenv.mkDerivation rec {
3939 homepage = "https://yoda.hepforge.org";
4040 platforms = stdenv.lib.platforms.unix;
4141 maintainers = with stdenv.lib.maintainers; [ veprbl ];
42+ # https://gitlab.com/hepcedar/yoda/-/issues/24
43+ broken = withRootSupport;
4244 };
4345}
pkgs/top-level/all-packages.nix+6−2
@@ -13153,9 +13153,11 @@ in
1315313153
1315413154 gle = callPackage ../development/libraries/gle { };
1315513155
13156− glew = callPackage ../development/libraries/glew { };
13156+ glew = callPackage ../development/libraries/glew {
13157+ inherit (darwin.apple_sdk.frameworks) OpenGL;
13158+ };
1315713159 glew110 = callPackage ../development/libraries/glew/1.10.nix {
13158− inherit (darwin.apple_sdk.frameworks) AGL;
13160+ inherit (darwin.apple_sdk.frameworks) AGL OpenGL;
1315913161 };
1316013162
1316113163 glfw = glfw3;
@@ -13820,6 +13822,8 @@ in
1382013822
1382113823 lib3mf = callPackage ../development/libraries/lib3mf { };
1382213824
13825+ libAfterImage = callPackage ../development/libraries/libAfterImage { };
13826+
1382313827 libaacs = callPackage ../development/libraries/libaacs { };
1382413828
1382513829 libaal = callPackage ../development/libraries/libaal { };