rocksdb: fix .pc handling in all three versions

I didn't realize the same nix expression is used for different
rocksdb versions.
This commit is contained in:
Vladimír Čunát 2022-09-28 17:13:57 +02:00
parent 7da8d25d87
commit d713eced06
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -58,9 +58,12 @@ stdenv.mkDerivation rec {
# otherwise "cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]"
hardeningDisable = lib.optional stdenv.hostPlatform.isWindows "format";
# Old version doesn't ship the .pc file, new version puts wrong paths in there.
postFixup = ''
substituteInPlace "$out"/lib/pkgconfig/rocksdb.pc \
--replace '="''${prefix}//' '="/'
if [ -f "$out"/lib/pkgconfig/rocksdb.pc ]; then
substituteInPlace "$out"/lib/pkgconfig/rocksdb.pc \
--replace '="''${prefix}//' '="/'
fi
'';
meta = with lib; {