base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / libnest2d / package.nix
blobb3aba528f924318f9098f218fbf330cee9cf3186
1 { lib, stdenv, fetchFromGitHub, cmake, clipper, nlopt, boost }:
3 stdenv.mkDerivation {
4   version = "4.12.0";
5   pname = "libnest2d";
7   # This revision is waiting to be merged upstream
8   # Once it has been merged, this should be switched to it
9   # Upstream PR: https://github.com/tamasmeszaros/libnest2d/pull/18
10   src = fetchFromGitHub {
11     owner = "Ultimaker";
12     repo = "libnest2d";
13     rev = "31391fd173249ad9b906390058e13b09238fadc8";
14     sha256 = "1hzqi4z55x76rss3xk7hfqhy9hcaq2jaav5jqxa1aqmbvarr2gla";
15   };
17   postPatch = ''
18     substituteInPlace {,examples/}CMakeLists.txt \
19       --replace "set(CMAKE_CXX_STANDARD 11)" "set(CMAKE_CXX_STANDARD 14)"
20   '';
22   propagatedBuildInputs = [ clipper nlopt boost ];
23   nativeBuildInputs = [ cmake ];
25   CLIPPER_PATH = "${clipper.out}";
26   cmakeFlags = [ "-DLIBNEST2D_HEADER_ONLY=OFF" ];
28   meta = with lib; {
29     description =
30       "2D irregular bin packaging and nesting library written in modern C++";
31     homepage = "https://github.com/Ultimaker/libnest2d";
32     license = licenses.lgpl3;
33     platforms = platforms.all;
34   };