From ac7b8b85ab92021f09aef5563a076bb7831fc468 Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Tue, 31 Jan 2023 20:25:05 +0100 Subject: [PATCH] lib3mf: fix include paths in pkg-config file Multi-output `includedir` magic for `pkg-config` was not working, as not only `libdir` was affected by `postPatch` script. And absolute path to include directory is not compatibe with this magic either. So the pkg-config file contained a path to non-existing directory (`include`, but in the main `out` output). The only package to use this library is openscad, but it's currently not picking it - will fix it in a separate PR. --- pkgs/development/libraries/lib3mf/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/lib3mf/default.nix b/pkgs/development/libraries/lib3mf/default.nix index b301ac13c2d..56af0278597 100644 --- a/pkgs/development/libraries/lib3mf/default.nix +++ b/pkgs/development/libraries/lib3mf/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; cmakeFlags = [ - "-DCMAKE_INSTALL_INCLUDEDIR=${placeholder "out"}/include/lib3mf" + "-DCMAKE_INSTALL_INCLUDEDIR=include/lib3mf" "-DUSE_INCLUDED_ZLIB=OFF" "-DUSE_INCLUDED_LIBZIP=OFF" "-DUSE_INCLUDED_GTEST=OFF" @@ -30,7 +30,8 @@ stdenv.mkDerivation rec { postPatch = '' # fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ - sed -i 's,=''${\(exec_\)\?prefix}/,=,' lib3mf.pc.in + sed -i 's,libdir=''${\(exec_\)\?prefix}/,libdir=,' lib3mf.pc.in + # replace bundled binaries for i in AutomaticComponentToolkit/bin/act.*; do