From 59ba6a3e2b2b4bfc77e60f6cdd1c49b8eef7a745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Mon, 19 Nov 2018 14:09:52 +0100 Subject: [PATCH] slic3r-prusa3d: patch lib name for newer nlopt versions The upgrade to version 2.5.0 of nlopt broke building of slic3r-prusa3d because the C++ version of the nlopt lib is now integrated into `libnlopt`. --- pkgs/applications/misc/slic3r/prusa3d.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/slic3r/prusa3d.nix b/pkgs/applications/misc/slic3r/prusa3d.nix index 445d996f605..2f5486a0f4b 100644 --- a/pkgs/applications/misc/slic3r/prusa3d.nix +++ b/pkgs/applications/misc/slic3r/prusa3d.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages, +{ stdenv, lib, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages, boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, libGLU, glew, eigen, curl, gtest, nlopt, pcre, xorg }: let @@ -98,6 +98,10 @@ stdenv.mkDerivation rec { # seems to be the easiest way. sed -i "s|\''${PERL_VENDORARCH}|$out/lib/slic3r-prusa3d|g" xs/CMakeLists.txt sed -i "s|\''${PERL_VENDORLIB}|$out/lib/slic3r-prusa3d|g" xs/CMakeLists.txt + '' + lib.optionalString (lib.versionOlder "2.5" nlopt.version) '' + # Since version 2.5.0 of nlopt we need to link to libnlopt, as libnlopt_cxx + # now seems to be integrated into the main lib. + sed -i 's|nlopt_cxx|nlopt|g' xs/src/libnest2d/cmake_modules/FindNLopt.cmake ''; postInstall = ''