From d8258b513d6a4b0f7776876f9c5a6b406f8ec9af Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 11 May 2021 16:00:03 +0200 Subject: [PATCH] tbb: add pkg-config file Gazebo does not list the tbb dependency in its pkg-config file otherwise. --- pkgs/development/libraries/tbb/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/development/libraries/tbb/default.nix index af22361f7a2..7aef5ba7476 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/development/libraries/tbb/default.nix @@ -51,6 +51,23 @@ stdenv.mkDerivation rec { runHook postInstall ''; + postInstall = let + pcTemplate = fetchurl { + url = "https://github.com/oneapi-src/oneTBB/raw/master/integration/pkg-config/tbb.pc.in"; + sha256 = "2pCad9txSpNbzac0vp/VY3x7HNySaYkbH3Rx8LK53pI="; + }; + in '' + # Generate pkg-config file based on upstream template. + # It should not be necessary with tbb after 2021.2. + mkdir -p "$out/lib/pkgconfig" + substitute "${pcTemplate}" "$out/lib/pkgconfig/tbb.pc" \ + --subst-var-by CMAKE_INSTALL_PREFIX "$out" \ + --subst-var-by CMAKE_INSTALL_LIBDIR "lib" \ + --subst-var-by CMAKE_INSTALL_INCLUDEDIR "include" \ + --subst-var-by TBB_VERSION "${version}" \ + --subst-var-by TBB_LIB_NAME "tbb" + ''; + meta = with lib; { description = "Intel Thread Building Blocks C++ Library"; homepage = "http://threadingbuildingblocks.org/";