Open joe-warren opened 3 months ago
I am unfortunately unable to build this on NixOS using the packaged opencascade-occt.
cpp/hs_Bnd_Box.cpp:1:10: error:
fatal error: Bnd_Box.hxx: No such file or directory
1 | #include <Bnd_Box.hxx>
| ^~~~~~~~~~~~~
|
1 | #include <Bnd_Box.hxx>
| ^
compilation terminated.
`c++' failed in phase `C++ Compiler'. (Exit code: 1)
Ah, thanks, looks like it's failing to pick up the header files, which opencascade-hs assumes should be in /usr/include/opencascade
.
If you can figure out where these are placed by the nix package, you could try setting either CPATH
, or extra-include-dirs
?
Thanks a lot for your help: much appreciated
It does work by setting --extra-include-dirs.
cabal.project:
packages: *.cabal
package opencascade-hs
extra-include-dirs: (output of find /nix/store -maxdepth 1 -name "*opencascade-occt-7.8.1")/include/opencascade
Unfortunately I am not the best with Haskell's tooling (and/or nix), so I have no idea how to integrate it elegantly in a nix package. Locally, for me this works well enough.
Thanks for the lovely project :)
I built a minimal example of a waterfall-cad based project building within Nix
This should hopefully give Nix users a starting point
I'm still keeping this issue open; I'd like to get to the point where the package in haskellPackages
just works, as opposed to at the moment, where you need to "do a bunch of nix stuff" to get the opencascade-hs
package to build against the Nix packaged version of OpenCascade
At present, the
hackage2Nix
export of this project doesn't compile, because theopencascade occt
libraries are missing (logs here).opencascade-occt
is packaged for nix (see here). So this should just require setting that package as a dependency.I am however, reluctant to do this in such a way that it prevents building this project without using nix.