ipu6-camera-hal: patch libs to find platform-specific ipu6-camera-bins

This commit is contained in:
André Silva 2023-12-07 19:16:11 +00:00
parent ae5f61ea9e
commit 74f7417eac
No known key found for this signature in database
GPG Key ID: 7C34FA12A023DC55

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation {
pkg-config
];
PKG_CONFIG_PATH = "${lib.getDev ipu6-camera-bins}/lib/${ipuTarget}/pkgconfig";
PKG_CONFIG_PATH = "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}/pkgconfig";
cmakeFlags = [
"-DIPU_VER=${ipuVersion}"
@ -68,6 +68,12 @@ stdenv.mkDerivation {
--replace '/usr/share/' "${placeholder "out"}/share/"
'';
postFixup = ''
for lib in $out/lib/*.so; do
patchelf --add-rpath "${lib.makeLibraryPath [ ipu6-camera-bins ]}/${ipuTarget}" $lib
done
'';
passthru = {
inherit ipuVersion;
};