vtk: switch to new sdk pattern on darwin
This commit is contained in:
parent
2d7c55054a
commit
71fbdd8190
@ -4,13 +4,10 @@
|
|||||||
, enableQt ? false, qtx11extras, qttools, qtdeclarative, qtEnv
|
, enableQt ? false, qtx11extras, qttools, qtdeclarative, qtEnv
|
||||||
, enablePython ? false, python ? throw "vtk: Python support requested, but no python interpreter was given."
|
, enablePython ? false, python ? throw "vtk: Python support requested, but no python interpreter was given."
|
||||||
, enableEgl ? false
|
, enableEgl ? false
|
||||||
# Darwin support
|
|
||||||
, AGL, Cocoa, CoreServices, DiskArbitration, IOKit, CFNetwork, Security, GLUT, OpenGL
|
|
||||||
, ApplicationServices, CoreText, IOSurface, ImageIO, xpc, libobjc
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) optionalString optionals optional;
|
inherit (lib) optionalString optionals;
|
||||||
|
|
||||||
version = "${majorVersion}.${minorVersion}";
|
version = "${majorVersion}.${minorVersion}";
|
||||||
pythonMajor = lib.substring 0 1 python.pythonVersion;
|
pythonMajor = lib.substring 0 1 python.pythonVersion;
|
||||||
@ -34,26 +31,10 @@ in stdenv.mkDerivation {
|
|||||||
libGLU
|
libGLU
|
||||||
xorgproto
|
xorgproto
|
||||||
libXt
|
libXt
|
||||||
] ++ optionals stdenv.hostPlatform.isDarwin [
|
|
||||||
xpc
|
|
||||||
AGL
|
|
||||||
Cocoa
|
|
||||||
CoreServices
|
|
||||||
DiskArbitration
|
|
||||||
IOKit
|
|
||||||
CFNetwork
|
|
||||||
Security
|
|
||||||
ApplicationServices
|
|
||||||
CoreText
|
|
||||||
IOSurface
|
|
||||||
ImageIO
|
|
||||||
OpenGL
|
|
||||||
GLUT
|
|
||||||
] ++ optionals enablePython [
|
] ++ optionals enablePython [
|
||||||
python
|
python
|
||||||
];
|
];
|
||||||
propagatedBuildInputs = optionals stdenv.hostPlatform.isDarwin [ libobjc ]
|
propagatedBuildInputs = optionals stdenv.hostPlatform.isLinux [ libX11 libGL ];
|
||||||
++ optionals stdenv.hostPlatform.isLinux [ libX11 libGL ];
|
|
||||||
# see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254
|
# see https://github.com/NixOS/nixpkgs/pull/178367#issuecomment-1238827254
|
||||||
|
|
||||||
patches = map fetchpatch patchesToFetch;
|
patches = map fetchpatch patchesToFetch;
|
||||||
@ -94,7 +75,6 @@ in stdenv.mkDerivation {
|
|||||||
] ++ optionals enableQt [
|
] ++ optionals enableQt [
|
||||||
"-DVTK_GROUP_ENABLE_Qt:STRING=YES"
|
"-DVTK_GROUP_ENABLE_Qt:STRING=YES"
|
||||||
]
|
]
|
||||||
++ optionals stdenv.hostPlatform.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ]
|
|
||||||
++ optionals enablePython [
|
++ optionals enablePython [
|
||||||
"-DVTK_WRAP_PYTHON:BOOL=ON"
|
"-DVTK_WRAP_PYTHON:BOOL=ON"
|
||||||
"-DVTK_PYTHON_VERSION:STRING=${pythonMajor}"
|
"-DVTK_PYTHON_VERSION:STRING=${pythonMajor}"
|
||||||
|
@ -11121,13 +11121,7 @@ with pkgs;
|
|||||||
gtkVersion = "4";
|
gtkVersion = "4";
|
||||||
};
|
};
|
||||||
|
|
||||||
vtk_9 = libsForQt5.callPackage ../development/libraries/vtk/9.x.nix {
|
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_withQt5 = vtk_9.override { enableQt = true; };
|
vtk_9_withQt5 = vtk_9.override { enableQt = true; };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user