diff --git a/pkgs/by-name/op/opencascade-occt/package.nix b/pkgs/by-name/op/opencascade-occt/package.nix index 72f84459a5f40..171ae1a81acab 100644 --- a/pkgs/by-name/op/opencascade-occt/package.nix +++ b/pkgs/by-name/op/opencascade-occt/package.nix @@ -1,7 +1,7 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, fetchpatch, cmake, ninja, @@ -15,34 +15,34 @@ libXi, vtk, withVtk ? false, - - # used in passthru.tests opencascade-occt, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "opencascade-occt"; - version = "7.8.1"; - commit = "V${builtins.replaceStrings [ "." ] [ "_" ] version}"; + version = "7.9.3"; - src = fetchurl { - name = "occt-${commit}.tar.gz"; - url = "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=${commit};sf=tgz"; - hash = "sha256-AGMZqTLLjXbzJFW/RSTsohAGV8sMxlUmdU/Y2oOzkk8="; + src = fetchFromGitHub { + owner = "Open-Cascade-SAS"; + repo = "OCCT"; + tag = "V${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}"; + hash = "sha256-Zp4m+f1wrzynoCrzIwvYELUXsY/NQIBY+HFk5UteufI="; }; - patches = [ + patches = lib.optionals (lib.versionOlder finalAttrs.version "7.9") [ # fix compilation on darwin against latest version of freetype # https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/330 (fetchpatch { url = "https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.diff"; hash = "sha256-NoC2mE3DG78Y0c9UWonx1vmXoU4g5XxFUT3eVXqLU60="; }) - - # patch does not apply against 7.9+, it was submitted upstream for future - # inclusion: https://github.com/Open-Cascade-SAS/OCCT/pull/683 - ./vtk-draw-conditional-glx.patch ]; + # Exclude TKIVtkDraw toolkits cause VTK has no glx support on darwin + postPatch = lib.optionalString (withVtk && stdenv.hostPlatform.isDarwin) '' + substituteInPlace adm/MODULES \ + --replace-fail "TKIVtkDraw" "" + ''; + nativeBuildInputs = [ cmake ninja @@ -89,4 +89,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ amiloradovsky ]; platforms = lib.platforms.all; }; -} +}) diff --git a/pkgs/by-name/op/opencascade-occt/vtk-draw-conditional-glx.patch b/pkgs/by-name/op/opencascade-occt/vtk-draw-conditional-glx.patch deleted file mode 100644 index 76993ae6046fc..0000000000000 --- a/pkgs/by-name/op/opencascade-occt/vtk-draw-conditional-glx.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 86905287dc..19214e8f2d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -623,5 +623,9 @@ if (USE_VTK) - add_definitions (-DHAVE_VTK) - set (OCCT_VTK_USED_TARGETS "" CACHE INTERNAL "" FORCE) - OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk") -+ if (DEFINED VTK_USE_X AND NOT VTK_USE_X) -+ message (STATUS "Info: TKIVtkDraw toolkits excluded due to VTK has no glx support") -+ list (REMOVE_ITEM BUILD_TOOLKITS TKIVtkDraw) -+ endif() - else() - OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK") diff --git a/pkgs/development/python-modules/pythonocc-core/default.nix b/pkgs/development/python-modules/pythonocc-core/default.nix index 93684b2441c74..9b441a73b8990 100644 --- a/pkgs/development/python-modules/pythonocc-core/default.nix +++ b/pkgs/development/python-modules/pythonocc-core/default.nix @@ -17,16 +17,16 @@ rapidjson, swig, }: - -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pythonocc-core"; - version = "7.8.1.1"; + # To avoid overriding opencascade-occt from 7.9.3 to 7.9.0. Go back to regular release next version. + version = "7.9.0-unstable-2025-12-31"; src = fetchFromGitHub { owner = "tpaviot"; repo = "pythonocc-core"; - tag = version; - hash = "sha256-0o2PQEN0/Z7FUPZEo2HxFFa+mN2bZnYI++HVu4ONpNA="; + rev = "2f8f1a7d99312e8b3e81d0bb2adab9b1e717d37b"; + hash = "sha256-fni6crPs58e8MUr2SfVHVD5nPFIEQcOfuAMLXJlWg88="; }; nativeBuildInputs = [ @@ -63,9 +63,9 @@ stdenv.mkDerivation rec { meta = { description = "Python wrapper for the OpenCASCADE 3D modeling kernel"; homepage = "https://github.com/tpaviot/pythonocc-core"; - changelog = "https://github.com/tpaviot/pythonocc-core/releases/tag/${version}"; + changelog = "https://github.com/tpaviot/pythonocc-core/releases/tag/${finalAttrs.version}"; license = lib.licenses.lgpl3; platforms = lib.platforms.unix; maintainers = [ ]; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5abbf6f9f11e4..35de7d236e13e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7309,13 +7309,6 @@ with pkgs; url = "https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=${commit};sf=tgz"; hash = "sha256-n3KFrN/mN1SVXfuhEUAQ1fJzrCvhiclxfEIouyj9Z18="; }; - patches = [ - # Backport GCC 14 build fix - (fetchpatch { - url = "https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch"; - hash = "sha256-NoC2mE3DG78Y0c9UWonx1vmXoU4g5XxFUT3eVXqLU60="; - }) - ]; }; opencascade-occt_7_6_1 = opencascade-occt.overrideAttrs {