Skip to content

Commit 0eaeed1

Browse files
committed
libnats-c: fix CMake _IMPORT_PREFIX
The generated cnats-config.cmake file looks for include files under $out but should look for them under $dev. Fix this in the same way as, for example, in [1]. See [2] for other instances. [1] NixOS#424658 [2] https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20_import_prefix
1 parent ba8256d commit 0eaeed1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkgs/by-name/li/libnats-c/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ stdenv.mkDerivation rec {
4040
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
4141
'';
4242

43+
postFixup = ''
44+
substituteInPlace $dev/lib/cmake/cnats/cnats-config.cmake \
45+
--replace-fail "_IMPORT_PREFIX \"$out\"" "_IMPORT_PREFIX \"$dev\""
46+
'';
47+
4348
meta = {
4449
description = "C API for the NATS messaging system";
4550
homepage = "https://github.com/nats-io/nats.c";

0 commit comments

Comments
 (0)