Skip to content

Commit

Permalink
rocksdb: fix .pc handling in all three versions
Browse files Browse the repository at this point in the history
I didn't realize the same nix expression is used for different
rocksdb versions.
  • Loading branch information
vcunat committed Sep 28, 2022
1 parent 7da8d25 commit d713ece
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/development/libraries/rocksdb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; {
Expand Down

0 comments on commit d713ece

Please sign in to comment.