1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 python, 6 cmake, 7 libnest2d, 8 sip4, 9 clipper, 10}: 11 12buildPythonPackage rec { 13 version = "4.12.0"; 14 pname = "pynest2d"; 15 format = "other"; 16 17 src = fetchFromGitHub { 18 owner = "Ultimaker"; 19 repo = "pynest2d"; 20 rev = version; 21 hash = "sha256-QQdTDhO4i9NVhegGTmdEQSNv3gooaZzTX/Rv86h3GEo="; 22 }; 23 24 propagatedBuildInputs = [ 25 libnest2d 26 sip4 27 clipper 28 ]; 29 nativeBuildInputs = [ cmake ]; 30 31 CLIPPER_PATH = "${clipper.out}"; 32 33 postPatch = '' 34 sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake 35 ''; 36 37 meta = with lib; { 38 description = "Python bindings for libnest2d"; 39 homepage = "https://github.com/Ultimaker/pynest2d"; 40 license = licenses.lgpl3; 41 platforms = platforms.linux; 42 }; 43}