root: add support for x86_64-darwin
1) add pcre dependency (for some reason builtin_pcre doesn't work) 2) Disable dependencies that are currently not supported by the expression. Most users should not need those. These are disabled to prevent cmake from picking them up from system and causing impurities. Once there is a user who needs these they will have to update the expression. 3) disable some OSX detection code that relies on /usr/bin/sw_vers that chooses c++ library, silences warnings and sets macosx-version-min. macosx-version-min is already set by nix using MACOSX_DEPLOYMENT_TARGET environment variable.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, python
|
||||
, libX11, libXpm, libXft, libXext, zlib, lzma, gsl }:
|
||||
{ stdenv, fetchurl, fetchpatch, cmake, pcre, pkgconfig, python
|
||||
, libX11, libXpm, libXft, libXext, zlib, lzma, gsl, Cocoa }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "root-${version}";
|
||||
@@ -10,13 +10,17 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "00f3v3l8nimfkcxpn9qpyh3h23na0mi4wkds2y5gwqh8wh3jryq9";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake pkgconfig python libX11 libXpm libXft libXext zlib lzma gsl ];
|
||||
buildInputs = [ cmake pcre pkgconfig python zlib lzma gsl ]
|
||||
++ stdenv.lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext ]
|
||||
++ stdenv.lib.optionals (stdenv.isDarwin) [ Cocoa ]
|
||||
;
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/root-mirror/root/commit/ee9964210c56e7c1868618a4434c5340fef38fe4.patch";
|
||||
sha256 = "186i7ni75yvjydy6lpmaplqxfb5z2019bgpbhff1n6zn2qlrff2r";
|
||||
})
|
||||
./sw_vers.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
@@ -27,6 +31,33 @@ stdenv.mkDerivation rec {
|
||||
"-Drpath=ON"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-Dalien=OFF"
|
||||
"-Dbonjour=OFF"
|
||||
"-Dcastor=OFF"
|
||||
"-Dchirp=OFF"
|
||||
"-Ddavix=OFF"
|
||||
"-Ddcache=OFF"
|
||||
"-Dfftw3=OFF"
|
||||
"-Dfitsio=OFF"
|
||||
"-Dfortran=OFF"
|
||||
"-Dgfal=OFF"
|
||||
"-Dgviz=OFF"
|
||||
"-Dhdfs=OFF"
|
||||
"-Dkrb5=OFF"
|
||||
"-Dldap=OFF"
|
||||
"-Dmonalisa=OFF"
|
||||
"-Dmysql=OFF"
|
||||
"-Dodbc=OFF"
|
||||
"-Dopengl=OFF"
|
||||
"-Doracle=OFF"
|
||||
"-Dpgsql=OFF"
|
||||
"-Dpythia6=OFF"
|
||||
"-Dpythia8=OFF"
|
||||
"-Drfio=OFF"
|
||||
"-Dsqlite=OFF"
|
||||
"-Dssl=OFF"
|
||||
"-Dxml=OFF"
|
||||
"-Dxrootd=OFF"
|
||||
]
|
||||
++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.lib.getDev stdenv.cc.libc}/include";
|
||||
|
||||
@@ -35,6 +66,6 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
homepage = "https://root.cern.ch/";
|
||||
description = "A data analysis framework";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user