1{ lib, buildPythonPackage, fetchFromGitHub, python3, cmake 2, libnest2d, sip_4, clipper }: 3 4buildPythonPackage rec { 5 version = "4.10.0"; 6 pname = "pynest2d"; 7 format = "other"; 8 9 src = fetchFromGitHub { 10 owner = "Ultimaker"; 11 repo = "pynest2d"; 12 rev = version; 13 sha256 = "03aj0whxj9rs9nz3idld7w4vpmnr6vr40vpwmzcf5w2pi2n4z4lk"; 14 }; 15 16 propagatedBuildInputs = [ libnest2d sip_4 clipper ]; 17 nativeBuildInputs = [ cmake ]; 18 19 CLIPPER_PATH = "${clipper.out}"; 20 21 postPatch = '' 22 sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python3.sitePackages}#' cmake/SIPMacros.cmake 23 ''; 24 25 meta = with lib; { 26 description = "Python bindings for libnest2d"; 27 homepage = "https://github.com/Ultimaker/pynest2d"; 28 license = licenses.lgpl3; 29 platforms = platforms.linux; 30 }; 31}