From 47b58ff43ebaef0307f4ef2de4e760ced3066cbf Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 24 Jun 2022 19:25:32 +0300 Subject: [PATCH] curl: put tests in tests.withCheck curl is built many times during a stdenv rebuild they are a bottleneck --- pkgs/tools/networking/curl/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index f07789cd730f..60b324d716c7 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -33,6 +33,8 @@ , ocamlPackages , phpExtensions , python3 +, tests +, fetchpatch }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -152,7 +154,10 @@ stdenv.mkDerivation (finalAttrs: { CXX = "${stdenv.cc.targetPrefix}c++"; CXXCPP = "${stdenv.cc.targetPrefix}c++ -E"; - doCheck = true; + # takes 14 minutes on a 24 core and because many other packages depend on curl + # they cannot be run concurrently and are a bottleneck + # tests are available in passthru.tests.withCheck + doCheck = false; preCheck = '' patchShebangs tests/ '' + lib.optionalString stdenv.isDarwin '' @@ -182,6 +187,8 @@ stdenv.mkDerivation (finalAttrs: { in { inherit opensslSupport openssl; tests = { + withCheck = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; }); + fetchpatch = tests.fetchpatch.simple.override { fetchpatch = fetchpatch.override { fetchurl = useThisCurl fetchurl; }; }; curlpp = useThisCurl curlpp; coeurl = useThisCurl coeurl; haskell-curl = useThisCurl haskellPackages.curl;