lucenepp: fix libdir for pkgconfig

This commit is contained in:
rewine 2022-07-08 14:45:36 +08:00
parent a27f1085d7
commit acf97a1d04

View file

@ -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)" ""