Skip to content

Commit

Permalink
opencascade-occt: fix compilation on darwin (NixOS#365409)
Browse files Browse the repository at this point in the history
```
FAILED: src/TKV3d/CMakeFiles/TKV3d.dir/__/StdPrs/StdPrs_BRepFont.cxx.o 
/nix/store/raqax5qp65an4jcwj1bzd5lq589ywpg0-clang-wrapper-16.0.6/bin/clang++ -DHAVE_FREETYPE -DHAVE_OPENGL -DHAVE_OPENGL_EXT -DHAVE_TK -DOCC_CO>
/tmp/nix-build-opencascade-occt-7.8.1.drv-0/occt-V7_8_1-bd2a789/src/StdPrs/StdPrs_BRepFont.cxx:460:17: error: cannot initialize a variable of t>
    const char* aTags      = &anOutline->tags[aStartIndex];
                ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
  • Loading branch information
veprbl authored Dec 19, 2024
1 parent cc46eef commit 159385c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/by-name/op/opencascade-occt/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, cmake
, ninja
, tcl
Expand All @@ -24,6 +25,15 @@ stdenv.mkDerivation rec {
hash = "sha256-AGMZqTLLjXbzJFW/RSTsohAGV8sMxlUmdU/Y2oOzkk8=";
};

patches = [
# 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=";
})
];

nativeBuildInputs = [
cmake
ninja
Expand Down

0 comments on commit 159385c

Please sign in to comment.