From cd99b54257664ffadf09f9605f230821c45ea270 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Tue, 9 Aug 2022 15:01:25 +0200 Subject: [PATCH] crc32c: don't install gtest The desired behavior can be controlled with a configuration option instead of manually cleaning the output afterwards. --- pkgs/development/libraries/crc32c/default.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pkgs/development/libraries/crc32c/default.nix b/pkgs/development/libraries/crc32c/default.nix index 2ba0c4e65b8b..8790840c4c1d 100644 --- a/pkgs/development/libraries/crc32c/default.nix +++ b/pkgs/development/libraries/crc32c/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { "-DCRC32C_BUILD_TESTS=1" "-DCRC32C_BUILD_BENCHMARKS=0" "-DCRC32C_USE_GLOG=0" + "-DINSTALL_GTEST=0" "-DBUILD_SHARED_LIBS=${if staticOnly then "0" else "1"}" ]; @@ -42,20 +43,7 @@ stdenv.mkDerivation rec { runHook postInstallCheck ''; - postInstallCheck = '' - # without removing these libraries, dependents will look for - # libgtest/libgmock etc here, which can result in link time errors - rm $out/lib/libg* - ''; - postFixup = '' - # dependents shouldn't be able to find gtest libraries as dependencies of - # this package - rm -r $out/lib/pkgconfig - - # remove GTest cmake config files - rm -r $out/lib/cmake/GTest - # fix bogus include paths for f in $(find $out/lib/cmake -name '*.cmake'); do substituteInPlace "$f" --replace "\''${_IMPORT_PREFIX}/$out/include" "\''${_IMPORT_PREFIX}/include"