2022-05-18 14:49:53 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python, cmake
|
2024-01-25 14:12:00 +00:00
|
|
|
, libnest2d, sip4, 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;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-QQdTDhO4i9NVhegGTmdEQSNv3gooaZzTX/Rv86h3GEo=";
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
propagatedBuildInputs = [ libnest2d sip4 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;
|
|
|
|
};
|
|
|
|
}
|