From 71fbdd81909d10804b2c221279c023106041a678 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Sun, 24 Nov 2024 20:17:18 +0100 Subject: [PATCH] vtk: switch to new sdk pattern on darwin --- pkgs/development/libraries/vtk/generic.nix | 24 ++-------------------- pkgs/top-level/all-packages.nix | 8 +------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index 3f7f05678f15..91c210814a89 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -4,13 +4,10 @@ , enableQt ? false, qtx11extras, qttools, qtdeclarative, qtEnv , enablePython ? false, python ? throw "vtk: Python support requested, but no python interpreter was given." , enableEgl ? false -# Darwin support -, AGL, Cocoa, CoreServices, DiskArbitration, IOKit, CFNetwork, Security, GLUT, OpenGL -, ApplicationServices, CoreText, IOSurface, ImageIO, xpc, libobjc }: let - inherit (lib) optionalString optionals optional; + inherit (lib) optionalString optionals; version = "${majorVersion}.${minorVersion}"; pythonMajor = lib.substring 0 1 python.pythonVersion; @@ -34,26 +31,10 @@ in stdenv.mkDerivation { libGLU xorgproto libXt - ] ++ optionals stdenv.hostPlatform.isDarwin [ - xpc - AGL - Cocoa - CoreServices - DiskArbitration - IOKit - CFNetwork - Security - ApplicationServices - CoreText - IOSurface - ImageIO - OpenGL - GLUT ] ++ optionals enablePython [ python ]; - propagatedBuildInputs = optionals stdenv.hostPlatform.isDarwin [ libobjc ] - ++ optionals stdenv.hostPlatform.isLinux [ libX11 libGL ]; + propagatedBuildInputs = optionals stdenv.hostPlatform.isLinux [ libX11 libGL ]; # see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254 patches = map fetchpatch patchesToFetch; @@ -94,7 +75,6 @@ in stdenv.mkDerivation { ] ++ optionals enableQt [ "-DVTK_GROUP_ENABLE_Qt:STRING=YES" ] - ++ optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ] ++ optionals enablePython [ "-DVTK_WRAP_PYTHON:BOOL=ON" "-DVTK_PYTHON_VERSION:STRING=${pythonMajor}" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7543000e7961..6f728b7b1860 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11121,13 +11121,7 @@ with pkgs; gtkVersion = "4"; }; - vtk_9 = libsForQt5.callPackage ../development/libraries/vtk/9.x.nix { - inherit (darwin) libobjc; - inherit (darwin.apple_sdk.libs) xpc; - inherit (darwin.apple_sdk.frameworks) AGL Cocoa CoreServices DiskArbitration - IOKit CFNetwork Security ApplicationServices - CoreText IOSurface ImageIO OpenGL GLUT; - }; + vtk_9 = libsForQt5.callPackage ../development/libraries/vtk/9.x.nix { }; vtk_9_withQt5 = vtk_9.override { enableQt = true; };