diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-11-12 12:00:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-12 12:00:55 +0000 |
commit | 1b3033ebfb1e92c3166b75c7f820d066f3dd3665 (patch) | |
tree | 77dac8b89ea940a62046ea26db0bdaa3a14faad7 /pkgs/development/libraries/vtk | |
parent | 85abdfd32e1c46e46c47853297820de456628296 (diff) | |
parent | 2709b7a1c6693cff8d5e44ccaf3f17385ed26d10 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/libraries/vtk')
-rw-r--r-- | pkgs/development/libraries/vtk/generic.nix | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index d7ac817c647dd..02309b275bdcb 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -1,7 +1,7 @@ { majorVersion, minorVersion, sourceSha256, patchesToFetch ? [] }: { stdenv, lib, fetchurl, cmake, libGLU, libGL, libX11, xorgproto, libXt, libpng, libtiff , fetchpatch -, enableQt ? false, qtbase, qtx11extras, qttools, qtdeclarative, qtEnv +, enableQt ? false, qtx11extras, qttools, qtdeclarative, qtEnv , enablePython ? false, python ? throw "vtk: Python support requested, but no python interpreter was given." # Darwin support , AGL, Cocoa, CoreServices, DiskArbitration, IOKit, CFNetwork, Security, GLUT, OpenGL @@ -11,11 +11,12 @@ let inherit (lib) optionalString optionals optional; + version = "${majorVersion}.${minorVersion}"; pythonMajor = lib.substring 0 1 python.pythonVersion; -in stdenv.mkDerivation rec { +in stdenv.mkDerivation { pname = "vtk${optionalString enableQt "-qvtk"}"; - version = "${majorVersion}.${minorVersion}"; + inherit version; src = fetchurl { url = "https://www.vtk.org/files/release/${majorVersion}/VTK-${version}.tar.gz"; @@ -25,9 +26,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ libpng libtiff ] - ++ optionals enableQt (if lib.versionOlder majorVersion "9" - then [ qtbase qtx11extras qttools ] - else [ (qtEnv "qvtk-qt-env" [ qtx11extras qttools qtdeclarative ]) ]) + ++ optionals enableQt [ (qtEnv "qvtk-qt-env" [ qtx11extras qttools qtdeclarative ]) ] ++ optionals stdenv.isLinux [ libGLU xorgproto @@ -66,8 +65,8 @@ in stdenv.mkDerivation rec { cmakeFlags = [ "-DCMAKE_C_FLAGS=-fPIC" "-DCMAKE_CXX_FLAGS=-fPIC" - "-D${if lib.versionOlder version "9.0" then "VTK_USE_SYSTEM_PNG" else "VTK_MODULE_USE_EXTERNAL_vtkpng"}=ON" - "-D${if lib.versionOlder version "9.0" then "VTK_USE_SYSTEM_TIFF" else "VTK_MODULE_USE_EXTERNAL_vtktiff"}=1" + "-DVTK_MODULE_USE_EXTERNAL_vtkpng=ON" + "-DVTK_MODULE_USE_EXTERNAL_vtktiff=1" ] ++ lib.optionals (!stdenv.isDarwin) [ "-DOPENGL_INCLUDE_DIR=${libGL}/include" ] ++ [ @@ -76,9 +75,7 @@ in stdenv.mkDerivation rec { "-DCMAKE_INSTALL_BINDIR=bin" "-DVTK_VERSIONED_INSTALL=OFF" ] ++ optionals enableQt [ - "-D${if lib.versionOlder version "9.0" then "VTK_Group_Qt:BOOL=ON" else "VTK_GROUP_ENABLE_Qt:STRING=YES"}" - ] ++ optionals (enableQt && lib.versionOlder version "8.0") [ - "-DVTK_QT_VERSION=5" + "-DVTK_GROUP_ENABLE_Qt:STRING=YES" ] ++ optionals stdenv.isDarwin [ "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ] ++ optionals enablePython [ @@ -109,7 +106,5 @@ in stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ knedlsepp tfmoraes lheckemann ]; platforms = with platforms; unix; - # /nix/store/xxxxxxx-apple-framework-Security/Library/Frameworks/Security.framework/Headers/Authorization.h:192:7: error: variably modified 'bytes' at file scope - broken = stdenv.isDarwin && (lib.versions.major majorVersion == "8"); }; } |