git.iko.soy/typeable/nixpkgs
on master help sign in
tbb: add pkg-config file

Gazebo does not list the tbb dependency in its pkg-config file otherwise.

commitd8258b513d6a4b0f7776876f9c5a6b406f8ec9af authorJan Tojnar <jtojnar@gmail.com> dateTue 11 May 2021, 16:00 (6 years ago) parentd2f30b0
1 file changed+17
pkgs/development/libraries/tbb/default.nix+17
pkgs/development/libraries/tbb/default.nix+17
@@ -51,6 +51,23 @@ stdenv.mkDerivation rec {
5151 runHook postInstall
5252 '';
5353
54+ postInstall = let
55+ pcTemplate = fetchurl {
56+ url = "https://github.com/oneapi-src/oneTBB/raw/master/integration/pkg-config/tbb.pc.in";
57+ sha256 = "2pCad9txSpNbzac0vp/VY3x7HNySaYkbH3Rx8LK53pI=";
58+ };
59+ in ''
60+ # Generate pkg-config file based on upstream template.
61+ # It should not be necessary with tbb after 2021.2.
62+ mkdir -p "$out/lib/pkgconfig"
63+ substitute "${pcTemplate}" "$out/lib/pkgconfig/tbb.pc" \
64+ --subst-var-by CMAKE_INSTALL_PREFIX "$out" \
65+ --subst-var-by CMAKE_INSTALL_LIBDIR "lib" \
66+ --subst-var-by CMAKE_INSTALL_INCLUDEDIR "include" \
67+ --subst-var-by TBB_VERSION "${version}" \
68+ --subst-var-by TBB_LIB_NAME "tbb"
69+ '';
70+
5471 meta = with lib; {
5572 description = "Intel Thread Building Blocks C++ Library";
5673 homepage = "http://threadingbuildingblocks.org/";