From acf97a1d046dad827ec2dace9c6cc4c050779a27 Mon Sep 17 00:00:00 2001 From: rewine Date: Fri, 8 Jul 2022 14:45:36 +0800 Subject: [PATCH] lucenepp: fix libdir for pkgconfig --- pkgs/development/libraries/lucene++/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/lucene++/default.nix b/pkgs/development/libraries/lucene++/default.nix index 96be84ee2a7e..08a348505006 100644 --- a/pkgs/development/libraries/lucene++/default.nix +++ b/pkgs/development/libraries/lucene++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, boost, gtest, zlib }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, gtest, zlib }: stdenv.mkDerivation rec { pname = "lucene++"; @@ -14,6 +14,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ boost gtest zlib ]; + cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]; + + patches = [ + (fetchpatch { + name = "pkgconfig_use_correct_LIBDIR_for_destination_library"; + url = "https://github.com/luceneplusplus/LucenePlusPlus/commit/39cd44bd54e918d25ee464477992ad0dc234dcba.patch"; + sha256 = "sha256-PP6ENNhPJMWrYDlTnr156XV8d5aX/VNX8v4vvi9ZiWo"; + }) + ]; + postPatch = '' substituteInPlace src/test/CMakeLists.txt \ --replace "add_subdirectory(gtest)" ""