From 76492d0c26aa6a2f22dd34557f060b40cc01dc4d Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 9 Apr 2022 04:17:27 +0200 Subject: [PATCH] leveldb: fix static building 1. The Makefile is long gone and the patch in not needed anymore. 2. For some reason LEVELDB_BUILD_BENCHMARKS=OFF is necessary when building statically. (Note: this has always been of for the shared build) --- pkgs/development/libraries/leveldb/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/libraries/leveldb/default.nix b/pkgs/development/libraries/leveldb/default.nix index c29a3232727..a6f75413c91 100644 --- a/pkgs/development/libraries/leveldb/default.nix +++ b/pkgs/development/libraries/leveldb/default.nix @@ -38,13 +38,9 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" "-DCMAKE_SKIP_BUILD_RPATH=OFF" "-DLEVELDB_BUILD_TESTS=OFF" + "-DLEVELDB_BUILD_BENCHMARKS=OFF" ]; - postPatch = lib.optionalString stdenv.hostPlatform.isStatic '' - # remove shared objects from "all" target - sed -i '/^all:/ s/$(SHARED_LIBS) $(SHARED_PROGRAMS)//' Makefile - ''; - postInstall = '' substituteInPlace "$out"/lib/cmake/leveldb/leveldbTargets.cmake \ --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES "'$dev'"'