tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
root5: init at 5.34.36
Dmitry Kalinkin
7 years ago
3187db6e
5c2a7f10
+185
3 changed files
expand all
collapse all
unified
split
pkgs
applications
science
misc
root
5.nix
sw_vers_root5.patch
top-level
all-packages.nix
+77
pkgs/applications/science/misc/root/5.nix
···
1
1
+
{ stdenv, fetchurl, cmake, pcre, pkgconfig, python2
2
2
+
, libX11, libXpm, libXft, libXext, libGLU_combined, zlib, libxml2, lzma, gsl_1
3
3
+
, Cocoa, OpenGL, noSplash ? false }:
4
4
+
5
5
+
stdenv.mkDerivation rec {
6
6
+
name = "root-${version}";
7
7
+
version = "5.34.36";
8
8
+
9
9
+
src = fetchurl {
10
10
+
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
11
11
+
sha256 = "1kbx1jxc0i5xfghpybk8927a0wamxyayij9c74zlqm0595gqx1pw";
12
12
+
};
13
13
+
14
14
+
nativeBuildInputs = [ pkgconfig ];
15
15
+
buildInputs = [ cmake pcre python2 zlib libxml2 lzma gsl_1 ]
16
16
+
++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU_combined ]
17
17
+
++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
18
18
+
;
19
19
+
20
20
+
patches = [
21
21
+
./sw_vers_root5.patch
22
22
+
];
23
23
+
24
24
+
preConfigure = ''
25
25
+
patchShebangs build/unix/
26
26
+
ln -s ${stdenv.lib.getDev stdenv.cc.libc}/include/AvailabilityMacros.h cint/cint/include/
27
27
+
'' + stdenv.lib.optionalString noSplash ''
28
28
+
substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
29
29
+
'';
30
30
+
31
31
+
cmakeFlags = [
32
32
+
"-Drpath=ON"
33
33
+
"-DCMAKE_INSTALL_LIBDIR=lib"
34
34
+
"-DCMAKE_INSTALL_INCLUDEDIR=include"
35
35
+
"-Dalien=OFF"
36
36
+
"-Dbonjour=OFF"
37
37
+
"-Dcastor=OFF"
38
38
+
"-Dchirp=OFF"
39
39
+
"-Ddavix=OFF"
40
40
+
"-Ddcache=OFF"
41
41
+
"-Dfftw3=OFF"
42
42
+
"-Dfitsio=OFF"
43
43
+
"-Dfortran=OFF"
44
44
+
"-Dgfal=OFF"
45
45
+
"-Dgsl_shared=ON"
46
46
+
"-Dgviz=OFF"
47
47
+
"-Dhdfs=OFF"
48
48
+
"-Dkrb5=OFF"
49
49
+
"-Dldap=OFF"
50
50
+
"-Dmathmore=ON"
51
51
+
"-Dmonalisa=OFF"
52
52
+
"-Dmysql=OFF"
53
53
+
"-Dodbc=OFF"
54
54
+
"-Dopengl=ON"
55
55
+
"-Doracle=OFF"
56
56
+
"-Dpgsql=OFF"
57
57
+
"-Dpythia6=OFF"
58
58
+
"-Dpythia8=OFF"
59
59
+
"-Drfio=OFF"
60
60
+
"-Dsqlite=OFF"
61
61
+
"-Dssl=OFF"
62
62
+
"-Dxml=ON"
63
63
+
"-Dxrootd=OFF"
64
64
+
]
65
65
+
++ stdenv.lib.optional stdenv.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks";
66
66
+
67
67
+
enableParallelBuilding = true;
68
68
+
69
69
+
setupHook = ./setup-hook.sh;
70
70
+
71
71
+
meta = with stdenv.lib; {
72
72
+
homepage = https://root.cern.ch/;
73
73
+
description = "A data analysis framework";
74
74
+
platforms = platforms.unix;
75
75
+
maintainers = with maintainers; [ veprbl ];
76
76
+
};
77
77
+
}
+104
pkgs/applications/science/misc/root/sw_vers_root5.patch
···
1
1
+
diff --git a/build/unix/compiledata.sh b/build/unix/compiledata.sh
2
2
+
--- a/build/unix/compiledata.sh
3
3
+
+++ b/build/unix/compiledata.sh
4
4
+
@@ -49,7 +49,7 @@ fi
5
5
+
6
6
+
if [ "$ARCH" = "macosx" ] || [ "$ARCH" = "macosx64" ] || \
7
7
+
[ "$ARCH" = "macosxicc" ]; then
8
8
+
- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
9
9
+
+ macosx_minor=7
10
10
+
SOEXT="so"
11
11
+
if [ $macosx_minor -ge 5 ]; then
12
12
+
if [ "x`echo $SOFLAGS | grep -- '-install_name'`" != "x" ]; then
13
13
+
diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
14
14
+
--- a/cmake/modules/SetUpMacOS.cmake
15
15
+
+++ b/cmake/modules/SetUpMacOS.cmake
16
16
+
@@ -12,25 +12,11 @@ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/X11R6)
17
17
+
#---------------------------------------------------------------------------------------------------------
18
18
+
19
19
+
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
20
20
+
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
21
21
+
- COMMAND cut -d . -f 1-2
22
22
+
- OUTPUT_VARIABLE MACOSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
23
23
+
- MESSAGE(STATUS "Found a Mac OS X System ${MACOSX_VERSION}")
24
24
+
- EXECUTE_PROCESS(COMMAND sw_vers "-productVersion"
25
25
+
- COMMAND cut -d . -f 2
26
26
+
- OUTPUT_VARIABLE MACOSX_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE)
27
27
+
-
28
28
+
- if(MACOSX_VERSION VERSION_GREATER 10.7 AND ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
29
29
+
set(libcxx ON CACHE BOOL "Build using libc++" FORCE)
30
30
+
- endif()
31
31
+
32
32
+
- if(${MACOSX_MINOR} GREATER 4)
33
33
+
#TODO: check haveconfig and rpath -> set rpath true
34
34
+
#TODO: check Thread, define link command
35
35
+
#TODO: more stuff check configure script
36
36
+
- execute_process(COMMAND /usr/sbin/sysctl machdep.cpu.extfeatures OUTPUT_VARIABLE SYSCTL_OUTPUT)
37
37
+
- if(${SYSCTL_OUTPUT} MATCHES 64)
38
38
+
- MESSAGE(STATUS "Found a 64bit system")
39
39
+
set(ROOT_ARCHITECTURE macosx64)
40
40
+
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
41
41
+
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -m64")
42
42
+
@@ -38,28 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
43
43
+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
44
44
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
45
45
+
SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m64")
46
46
+
- else(${SYSCTL_OUTPUT} MATCHES 64)
47
47
+
- MESSAGE(STATUS "Found a 32bit system")
48
48
+
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
49
49
+
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
50
50
+
- SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m32")
51
51
+
- endif(${SYSCTL_OUTPUT} MATCHES 64)
52
52
+
- endif()
53
53
+
-
54
54
+
- if(MACOSX_VERSION VERSION_GREATER 10.6)
55
55
+
- set(MACOSX_SSL_DEPRECATED ON)
56
56
+
- endif()
57
57
+
- if(MACOSX_VERSION VERSION_GREATER 10.7)
58
58
+
- set(MACOSX_ODBC_DEPRECATED ON)
59
59
+
- endif()
60
60
+
- if(MACOSX_VERSION VERSION_GREATER 10.8)
61
61
+
- set(MACOSX_GLU_DEPRECATED ON)
62
62
+
- set(MACOSX_KRB5_DEPRECATED ON)
63
63
+
- set(MACOSX_TMPNAM_DEPRECATED ON)
64
64
+
- endif()
65
65
+
- if(MACOSX_VERSION VERSION_GREATER 10.9)
66
66
+
- set(MACOSX_LDAP_DEPRECATED ON)
67
67
+
- endif()
68
68
+
69
69
+
if (CMAKE_COMPILER_IS_GNUCXX)
70
70
+
message(STATUS "Found GNU compiler collection")
71
71
+
@@ -132,7 +96,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
72
72
+
endif()
73
73
+
74
74
+
#---Set Linker flags----------------------------------------------------------------------
75
75
+
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mmacosx-version-min=${MACOSX_VERSION} -Wl,-rpath,@loader_path/../lib")
76
76
+
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../lib")
77
77
+
78
78
+
79
79
+
else (CMAKE_SYSTEM_NAME MATCHES Darwin)
80
80
+
diff --git a/config/root-config.in b/config/root-config.in
81
81
+
--- a/config/root-config.in
82
82
+
+++ b/config/root-config.in
83
83
+
@@ -391,7 +391,7 @@ macosxicc)
84
84
+
;;
85
85
+
macosx64)
86
86
+
# MacOS X with gcc (GNU cc v4.x) in 64 bit mode
87
87
+
- macosx_minor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2`
88
88
+
+ macosx_minor=7
89
89
+
# cannot find the one linked to libGraf if relocated after built
90
90
+
if [ $macosx_minor -le 4 ]; then
91
91
+
rootlibs="$rootlibs -lfreetype"
92
92
+
diff --git a/cint/ROOT/CMakeLists.txt b/cint/ROOT/CMakeLists.txt
93
93
+
--- a/cint/ROOT/CMakeLists.txt
94
94
+
+++ b/cint/ROOT/CMakeLists.txt
95
95
+
@@ -232,9 +232,7 @@ foreach(_name ${CINTINCDLLNAMES})
96
96
+
DEPENDS ${HEADER_OUTPUT_PATH}/systypes.h
97
97
+
)
98
98
+
99
99
+
- if(MACOSX_MINOR GREATER 4)
100
100
+
set(_ExtraFlag "-D__DARWIN_UNIX03")
101
101
+
- endif()
102
102
+
103
103
+
add_custom_command(OUTPUT ${OutFileName}
104
104
+
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
+4
pkgs/top-level/all-packages.nix
···
21380
21380
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
21381
21381
};
21382
21382
21383
21383
+
root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix {
21384
21384
+
inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL;
21385
21385
+
});
21386
21386
+
21383
21387
simgrid = callPackage ../applications/science/misc/simgrid { };
21384
21388
21385
21389
spyder = callPackage ../applications/science/spyder { };