depot/third_party/nixpkgs/pkgs/development/python-modules/ifcopenshell/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

60 lines
1.4 KiB
Nix

{ lib, stdenv
, buildPythonPackage
, fetchFromGitHub
, gcc10
, cmake
, boost179
, icu
, swig
, pcre
, opencascade-occt
, opencollada
, libxml2
}:
buildPythonPackage rec {
pname = "ifcopenshell";
version = "231201";
format = "other";
src = fetchFromGitHub {
owner = "IfcOpenShell";
repo = "IfcOpenShell";
rev = "refs/tags/blenderbim-${version}";
fetchSubmodules = true;
sha256 = "sha256-T7XT5gvfzhagecB3jrTyWOawOm4iye7SCsmYhnjtOTE=";
};
nativeBuildInputs = [ gcc10 cmake ];
buildInputs = [
boost179
icu
pcre
libxml2
];
preConfigure = ''
cd cmake
'';
PYTHONUSERBASE=".";
cmakeFlags = [
"-DUSERSPACE_PYTHON_PREFIX=ON"
"-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/libxml2${stdenv.hostPlatform.extensions.sharedLibrary}"
];
meta = with lib; {
broken = stdenv.isDarwin;
description = "Open source IFC library and geometry engine";
homepage = "http://ifcopenshell.org/";
license = licenses.lgpl3;
maintainers = with maintainers; [ fehnomenal ];
};
}