From 2125e07024ba75dda187e607739f13c4b9537415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Tue, 2 Oct 2018 09:22:57 +0200 Subject: [PATCH] slic3r-prusa3d: comments on why we apply some patches --- pkgs/applications/misc/slic3r/prusa3d.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/misc/slic3r/prusa3d.nix b/pkgs/applications/misc/slic3r/prusa3d.nix index 9f4036c3f96..f871b07b85c 100644 --- a/pkgs/applications/misc/slic3r/prusa3d.nix +++ b/pkgs/applications/misc/slic3r/prusa3d.nix @@ -73,7 +73,15 @@ stdenv.mkDerivation rec { ]); prePatch = '' + # In nix ioctls.h isn't available from the standard kernel-headers package + # on other distributions. As the copy in glibc seems to be identical to the + # one in the kernel, we use that one instead. sed -i 's|"/usr/include/asm-generic/ioctls.h"||g' xs/src/libslic3r/GCodeSender.cpp + + # PERL_VENDORARCH and PERL_VENDORLIB aren't detected correctly by the build + # system, so we have to override them. Setting them as environment variables + # doesn't work though, so patching the paths directly in the CMakeLists.txt + # seems to be the easisest 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 '';