From 5473798787bcd6e4be1aa9603e9ebe5ef1533da0 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 14 Nov 2024 14:30:21 -0500 Subject: [PATCH] root: adapt to new darwin SDK --- pkgs/applications/science/misc/root/5.nix | 5 +---- pkgs/applications/science/misc/root/default.nix | 12 +++++------- pkgs/top-level/all-packages.nix | 5 +---- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix index 62f80ee48096..b6e27322f5c7 100644 --- a/pkgs/applications/science/misc/root/5.nix +++ b/pkgs/applications/science/misc/root/5.nix @@ -19,8 +19,6 @@ , xz , gsl , xxHash -, Cocoa -, OpenGL , noSplash ? false }: @@ -36,7 +34,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ pcre python3 zlib libxml2 lz4 xz gsl xxHash libxcrypt ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ Cocoa OpenGL ] ; patches = [ @@ -147,7 +144,7 @@ stdenv.mkDerivation rec { "-Dxml=ON" "-Dxrootd=OFF" ] - ++ lib.optional stdenv.hostPlatform.isDarwin "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"; + ++ lib.optional ((!stdenv.hostPlatform.isDarwin) && (stdenv.cc.libc != null)) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"; setupHook = ./setup-hook.sh; diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 91450bcab748..8991da6aab2c 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -5,6 +5,7 @@ , fetchurl , makeWrapper , writeText +, apple-sdk , cmake , coreutils , git @@ -50,9 +51,6 @@ , patchRcPathPosix , tbb , xrootd -, Cocoa -, CoreSymbolication -, OpenGL }: stdenv.mkDerivation rec { @@ -110,8 +108,10 @@ stdenv.mkDerivation rec { tbb xrootd ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + apple-sdk.privateFrameworksHook + ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ Cocoa CoreSymbolication OpenGL ] ; patches = [ @@ -172,10 +172,8 @@ stdenv.mkDerivation rec { "-Dsqlite=OFF" "-Dvdt=OFF" ] - ++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include" + ++ lib.optional ((!stdenv.hostPlatform.isDarwin) && (stdenv.cc.libc != null)) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include" ++ lib.optionals stdenv.hostPlatform.isDarwin [ - "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" - # fatal error: module map file '/nix/store/-Libsystem-osx-10.12.6/include/module.modulemap' not found # fatal error: could not build module '_Builtin_intrinsics' "-Druntime_cxxmodules=OFF" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b08d97d5d06c..1ca157fd8a65 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18236,12 +18236,9 @@ with pkgs; root = callPackage ../applications/science/misc/root { python = python3; - inherit (darwin.apple_sdk.frameworks) Cocoa CoreSymbolication OpenGL; }; - root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix { - inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL; - }); + root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix { }); rink = callPackage ../applications/science/misc/rink { inherit (darwin.apple_sdk.frameworks) Security;