summary refs log tree commit diff
path: root/pkgs/applications/science/misc/root/5.nix
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-12-15 20:55:38 +0300
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2019-03-20 00:26:13 -0400
commitc36f841ec7e88f02a7cde7ca5511b15e75849f61 (patch)
treed724dca217011fd615d521aeacafd0c1f6d04a1f /pkgs/applications/science/misc/root/5.nix
parent52dae14f0c763dd48572058f0f0906166da14c31 (diff)
downloadnixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.tar
nixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.tar.gz
nixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.tar.bz2
nixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.tar.lz
nixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.tar.xz
nixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.tar.zst
nixpkgs-c36f841ec7e88f02a7cde7ca5511b15e75849f61.zip
root5: fix build
Diffstat (limited to 'pkgs/applications/science/misc/root/5.nix')
-rw-r--r--pkgs/applications/science/misc/root/5.nix24
1 files changed, 20 insertions, 4 deletions
diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix
index 1f0fc663647..871f5ece9cf 100644
--- a/pkgs/applications/science/misc/root/5.nix
+++ b/pkgs/applications/science/misc/root/5.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, cmake, pcre, pkgconfig, python2
+{ stdenv, fetchurl, fetchpatch, cmake, pcre, pkgconfig, python2
 , libX11, libXpm, libXft, libXext, libGLU_combined, zlib, libxml2, lzma, gsl_1
 , Cocoa, OpenGL, cf-private, noSplash ? false }:
 
@@ -19,11 +19,30 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./sw_vers_root5.patch
+
+    (fetchpatch {
+      name = "enable_new_gcc.patch";
+      url = "https://aur.archlinux.org/cgit/aur.git/plain/enable_new_gcc.patch?h=root5&id=91c50876081a0af36f84ec4f0f9dba869107fa4f";
+      sha256 = "1rnp0xlw0yqi7mjs4w145njd79i8kkir1qik7zwicdik9axf8ygm";
+    })
+
+    # 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
   ];
 
   preConfigure = ''
     patchShebangs build/unix/
     ln -s ${stdenv.lib.getDev stdenv.cc.libc}/include/AvailabilityMacros.h cint/cint/include/
+  ''
+  # 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";'
   '' + stdenv.lib.optionalString noSplash ''
     substituteInPlace rootx/src/rootx.cxx --replace "gNoLogo = false" "gNoLogo = true"
   '';
@@ -73,8 +92,5 @@ stdenv.mkDerivation rec {
     description = "A data analysis framework";
     platforms = platforms.unix;
     maintainers = with maintainers; [ veprbl ];
-    # needs to be adapted to work with modern glibc
-    # it works on darwin by impurely picking up system's libc headers
-    broken = stdenv.isLinux;
   };
 }