2021-06-05 16:31:39 +02:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, cmake, git, ftgl, gl2ps, glew, gsl
|
|
|
|
, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, xz, pcre, nlohmann_json
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config, python, xxHash, zlib, zstd
|
2020-12-17 22:54:07 +01:00
|
|
|
, libAfterImage, giflib, libjpeg, libtiff, libpng
|
2019-06-19 23:21:10 +02:00
|
|
|
, Cocoa, OpenGL, noSplash ? false }:
|
2014-01-13 21:43:54 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "root";
|
2021-06-05 16:31:39 +02:00
|
|
|
version = "6.24.00";
|
2014-01-13 21:43:54 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-04-18 03:30:46 +02:00
|
|
|
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
|
2021-06-05 16:31:39 +02:00
|
|
|
sha256 = "12crjzd7pzx5qpk2pb3z0rhmxlw5gsqaqzfl48qiq8c9l940b8wx";
|
2014-01-13 21:43:54 +01:00
|
|
|
};
|
|
|
|
|
2021-06-05 16:31:39 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper cmake pkg-config git ];
|
|
|
|
buildInputs = [ ftgl gl2ps glew pcre zlib zstd libxml2 lz4 xz gsl xxHash libAfterImage giflib libjpeg libtiff libpng nlohmann_json python.pkgs.numpy ]
|
2020-07-02 20:22:41 +02:00
|
|
|
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
|
|
|
|
++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
|
2016-08-20 10:32:09 +02:00
|
|
|
;
|
2016-07-30 02:41:37 +02:00
|
|
|
|
|
|
|
patches = [
|
2016-08-20 10:32:09 +02:00
|
|
|
./sw_vers.patch
|
2016-07-30 02:41:37 +02:00
|
|
|
];
|
2015-09-01 08:21:46 +02:00
|
|
|
|
2016-04-25 23:38:19 +02:00
|
|
|
preConfigure = ''
|
2019-12-12 02:04:29 +01:00
|
|
|
rm -rf builtins/*
|
|
|
|
substituteInPlace cmake/modules/SearchInstalledSoftware.cmake \
|
|
|
|
--replace 'set(lcgpackages ' '#set(lcgpackages '
|
|
|
|
|
2021-06-05 16:31:39 +02:00
|
|
|
# Don't require textutil on macOS
|
|
|
|
: > cmake/modules/RootCPack.cmake
|
|
|
|
|
|
|
|
# Hardcode path to fix use with cmake
|
|
|
|
sed -i cmake/scripts/ROOTConfig.cmake.in \
|
|
|
|
-e 'iset(nlohmann_json_DIR "${nlohmann_json}/lib/cmake/nlohmann_json/")'
|
|
|
|
|
2016-04-25 23:38:19 +02:00
|
|
|
patchShebangs build/unix/
|
2021-01-15 14:21:58 +01:00
|
|
|
'' + lib.optionalString noSplash ''
|
2017-08-30 18:04:45 +02:00
|
|
|
substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
|
2016-04-25 23:38:19 +02:00
|
|
|
'';
|
|
|
|
|
2016-04-20 07:41:46 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-Drpath=ON"
|
2021-06-05 16:31:39 +02:00
|
|
|
"-DCMAKE_CXX_STANDARD=17"
|
2016-04-25 23:38:19 +02:00
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
2021-06-05 16:31:39 +02:00
|
|
|
"-Dbuiltin_nlohmannjson=OFF"
|
|
|
|
"-Dbuiltin_openui5=OFF"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Dalien=OFF"
|
|
|
|
"-Dbonjour=OFF"
|
|
|
|
"-Dcastor=OFF"
|
|
|
|
"-Dchirp=OFF"
|
2019-12-12 02:04:29 +01:00
|
|
|
"-Dclad=OFF"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Ddavix=OFF"
|
|
|
|
"-Ddcache=OFF"
|
2019-12-12 02:04:29 +01:00
|
|
|
"-Dfail-on-missing=ON"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Dfftw3=OFF"
|
|
|
|
"-Dfitsio=OFF"
|
|
|
|
"-Dfortran=OFF"
|
2017-06-23 18:48:42 +02:00
|
|
|
"-Dimt=OFF"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Dgfal=OFF"
|
|
|
|
"-Dgviz=OFF"
|
|
|
|
"-Dhdfs=OFF"
|
2021-06-05 16:31:39 +02:00
|
|
|
"-Dhttp=ON"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Dkrb5=OFF"
|
|
|
|
"-Dldap=OFF"
|
|
|
|
"-Dmonalisa=OFF"
|
|
|
|
"-Dmysql=OFF"
|
|
|
|
"-Dodbc=OFF"
|
2017-04-26 05:28:13 +02:00
|
|
|
"-Dopengl=ON"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Doracle=OFF"
|
|
|
|
"-Dpgsql=OFF"
|
|
|
|
"-Dpythia6=OFF"
|
|
|
|
"-Dpythia8=OFF"
|
|
|
|
"-Drfio=OFF"
|
2021-06-05 16:31:39 +02:00
|
|
|
"-Droot7=OFF"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Dsqlite=OFF"
|
|
|
|
"-Dssl=OFF"
|
2019-12-12 02:04:29 +01:00
|
|
|
"-Dvdt=OFF"
|
2021-06-05 16:31:39 +02:00
|
|
|
"-Dwebgui=OFF"
|
2017-04-26 05:28:13 +02:00
|
|
|
"-Dxml=ON"
|
2016-08-20 10:32:09 +02:00
|
|
|
"-Dxrootd=OFF"
|
2016-04-20 07:41:46 +02:00
|
|
|
]
|
2021-01-15 14:21:58 +01:00
|
|
|
++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
2020-12-21 22:43:09 +01:00
|
|
|
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
|
|
|
|
"-DCMAKE_DISABLE_FIND_PACKAGE_Python2=TRUE"
|
|
|
|
|
|
|
|
# fatal error: module map file '/nix/store/<hash>-Libsystem-osx-10.12.6/include/module.modulemap' not found
|
|
|
|
# fatal error: could not build module '_Builtin_intrinsics'
|
|
|
|
"-Druntime_cxxmodules=OFF"
|
|
|
|
];
|
2014-01-13 21:43:54 +01:00
|
|
|
|
2019-12-26 16:59:18 +01:00
|
|
|
postInstall = ''
|
|
|
|
for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do
|
|
|
|
wrapProgram "$out/bin/$prog" \
|
|
|
|
--prefix PYTHONPATH : "$out/lib"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2016-09-18 10:45:10 +02:00
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://root.cern.ch/";
|
2014-01-13 21:43:54 +01:00
|
|
|
description = "A data analysis framework";
|
2018-09-08 14:51:28 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.veprbl ];
|
|
|
|
license = licenses.lgpl21;
|
2014-01-13 21:43:54 +01:00
|
|
|
};
|
|
|
|
}
|