2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gcc10,
|
|
|
|
cmake,
|
|
|
|
boost179,
|
|
|
|
icu,
|
|
|
|
swig,
|
|
|
|
pcre,
|
|
|
|
opencascade-occt_7_6,
|
|
|
|
opencollada,
|
|
|
|
libxml2,
|
2020-11-30 08:33:03 +00:00
|
|
|
}:
|
2024-06-05 15:53:02 +00:00
|
|
|
let
|
|
|
|
opencascade-occt = opencascade-occt_7_6;
|
|
|
|
in
|
2020-11-30 08:33:03 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ifcopenshell";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "240306";
|
2020-11-30 08:33:03 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-06-05 15:53:02 +00:00
|
|
|
owner = "IfcOpenShell";
|
|
|
|
repo = "IfcOpenShell";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/blenderbim-${version}";
|
2020-11-30 08:33:03 +00:00
|
|
|
fetchSubmodules = true;
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-DtA8KeWipPfOnztKG/lrgLZeOCUG3nWR9oW7OST7koc=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gcc10
|
|
|
|
cmake
|
|
|
|
];
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
boost179
|
2020-11-30 08:33:03 +00:00
|
|
|
icu
|
|
|
|
pcre
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd cmake
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
PYTHONUSERBASE = ".";
|
2020-11-30 08:33:03 +00:00
|
|
|
cmakeFlags = [
|
2021-04-12 18:23:04 +00:00
|
|
|
"-DUSERSPACE_PYTHON_PREFIX=ON"
|
2020-11-30 08:33:03 +00:00
|
|
|
"-DOCC_INCLUDE_DIR=${opencascade-occt}/include/opencascade"
|
|
|
|
"-DOCC_LIBRARY_DIR=${opencascade-occt}/lib"
|
|
|
|
"-DOPENCOLLADA_INCLUDE_DIR=${opencollada}/include/opencollada"
|
|
|
|
"-DOPENCOLLADA_LIBRARY_DIR=${opencollada}/lib/opencollada"
|
|
|
|
"-DSWIG_EXECUTABLE=${swig}/bin/swig"
|
|
|
|
"-DLIBXML2_INCLUDE_DIR=${libxml2.dev}/include/libxml2"
|
2021-10-14 00:43:12 +00:00
|
|
|
"-DLIBXML2_LIBRARIES=${libxml2.out}/lib/libxml2${stdenv.hostPlatform.extensions.sharedLibrary}"
|
2020-11-30 08:33:03 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-11-30 08:33:03 +00:00
|
|
|
description = "Open source IFC library and geometry engine";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "http://ifcopenshell.org/";
|
|
|
|
license = licenses.lgpl3;
|
2020-11-30 08:33:03 +00:00
|
|
|
maintainers = with maintainers; [ fehnomenal ];
|
|
|
|
};
|
|
|
|
}
|