2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-11-27 08:48:32 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, gcc10
|
|
|
|
, cmake
|
2021-04-11 11:10:46 +01:00
|
|
|
, boost17x
|
2020-11-27 08:48:32 +00:00
|
|
|
, icu
|
|
|
|
, swig
|
|
|
|
, pcre
|
|
|
|
, opencascade-occt
|
|
|
|
, opencollada
|
|
|
|
, libxml2
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ifcopenshell";
|
2021-04-11 11:10:46 +01:00
|
|
|
version = "210410";
|
2020-11-27 08:48:32 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "IfcOpenShell";
|
|
|
|
repo = "IfcOpenShell";
|
2021-04-11 11:10:46 +01:00
|
|
|
rev = "blenderbim-${version}";
|
2020-11-27 08:48:32 +00:00
|
|
|
fetchSubmodules = true;
|
2021-04-11 11:10:46 +01:00
|
|
|
sha256 = "1g52asxrqcfj01iqvf03k3bb6rg3v04hh1wc3nmn329a2lwjbxpw";
|
2020-11-27 08:48:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gcc10 cmake ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-04-11 11:10:46 +01:00
|
|
|
boost17x
|
2020-11-27 08:48:32 +00:00
|
|
|
icu
|
|
|
|
pcre
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd cmake
|
|
|
|
'';
|
|
|
|
|
2021-04-11 11:10:46 +01:00
|
|
|
PYTHONUSERBASE=".";
|
2020-11-27 08:48:32 +00:00
|
|
|
cmakeFlags = [
|
2021-04-11 11:10:46 +01:00
|
|
|
"-DUSERSPACE_PYTHON_PREFIX=ON"
|
2020-11-27 08:48:32 +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"
|
|
|
|
"-DLIBXML2_LIBRARIES=${libxml2.out}/lib/${if stdenv.isDarwin then "libxml2.dylib" else "libxml2.so"}"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-11-27 08:48:32 +00:00
|
|
|
description = "Open source IFC library and geometry engine";
|
|
|
|
homepage = http://ifcopenshell.org/;
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
maintainers = with maintainers; [ fehnomenal ];
|
|
|
|
};
|
|
|
|
}
|