about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-06-24 19:25:32 +0300
committerArtturin <Artturin@artturin.com>2022-06-28 02:17:12 +0300
commit47b58ff43ebaef0307f4ef2de4e760ced3066cbf (patch)
tree79940ec71eeb69b793f4e8cb266ff8600b58c75a
parent6bce3fc64efd39e7e6b6cc2917eb533afbe33719 (diff)
curl: put tests in tests.withCheck
curl is built many times during a stdenv rebuild

they are a bottleneck
-rw-r--r--pkgs/tools/networking/curl/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index f07789cd730f3..60b324d716c7e 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;