From 092a1ea9ac519b0ac73d864561d84e20cecfb7fc Mon Sep 17 00:00:00 2001 From: Alexander Shpilkin Date: Mon, 16 May 2022 20:12:04 +0300 Subject: [PATCH] eccodes: fix paths in pkg-config files --- pkgs/development/libraries/eccodes/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/eccodes/default.nix b/pkgs/development/libraries/eccodes/default.nix index b6d4cd29f7e1..54df7be6f1ba 100644 --- a/pkgs/development/libraries/eccodes/default.nix +++ b/pkgs/development/libraries/eccodes/default.nix @@ -24,6 +24,17 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace cmake/FindOpenJPEG.cmake --replace openjpeg-2.1 ${openjpeg.incDir} + + # https://github.com/ecmwf/ecbuild/issues/40 + substituteInPlace cmake/ecbuild_config.h.in \ + --replace @CMAKE_INSTALL_PREFIX@/@INSTALL_LIB_DIR@ @eccodes_FULL_INSTALL_LIB_DIR@ \ + --replace @CMAKE_INSTALL_PREFIX@/@INSTALL_BIN_DIR@ @eccodes_FULL_INSTALL_BIN_DIR@ + substituteInPlace cmake/pkg-config.pc.in \ + --replace '$'{prefix}/@INSTALL_LIB_DIR@ @eccodes_FULL_INSTALL_LIB_DIR@ \ + --replace '$'{prefix}/@INSTALL_INCLUDE_DIR@ @eccodes_FULL_INSTALL_INCLUDE_DIR@ \ + --replace '$'{prefix}/@INSTALL_BIN_DIR@ @eccodes_FULL_INSTALL_BIN_DIR@ + substituteInPlace cmake/ecbuild_install_project.cmake \ + --replace '$'{CMAKE_INSTALL_PREFIX}/'$'{INSTALL_INCLUDE_DIR} '$'{'$'{PROJECT_NAME}_FULL_INSTALL_INCLUDE_DIR} ''; nativeBuildInputs = [ cmake gfortran perl ];