2022-05-18 14:49:53 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python, cmake
|
2021-12-06 16:07:01 +00:00
|
|
|
, libnest2d, sip_4, clipper }:
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-24 04:21:11 +00:00
|
|
|
version = "4.12.0";
|
2020-12-07 07:45:13 +00:00
|
|
|
pname = "pynest2d";
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ultimaker";
|
|
|
|
repo = "pynest2d";
|
|
|
|
rev = version;
|
2021-12-24 04:21:11 +00:00
|
|
|
sha256 = "sha256-QQdTDhO4i9NVhegGTmdEQSNv3gooaZzTX/Rv86h3GEo=";
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ libnest2d sip_4 clipper ];
|
2020-12-07 07:45:13 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
CLIPPER_PATH = "${clipper.out}";
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-05-18 14:49:53 +00:00
|
|
|
sed -i 's#''${Python3_SITEARCH}#${placeholder "out"}/${python.sitePackages}#' cmake/SIPMacros.cmake
|
2020-12-07 07:45:13 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-07 07:45:13 +00:00
|
|
|
description = "Python bindings for libnest2d";
|
|
|
|
homepage = "https://github.com/Ultimaker/pynest2d";
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|