diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 7f81ca1c69b8..626a16bd9e2d 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -156,6 +156,7 @@ in rec { (onSystems ["i686-linux"] "nixos.tests.zfs.installer") (onFullSupported "nixpkgs.emacs") (onFullSupported "nixpkgs.jdk") + (onFullSupported "nixpkgs.tests.packageTestsForChannelBlockers.curl.withCheck") ["nixpkgs.tarball"] ]; }; diff --git a/nixos/release-small.nix b/nixos/release-small.nix index 1d51b4e7f28f..bd1e1b95d1fb 100644 --- a/nixos/release-small.nix +++ b/nixos/release-small.nix @@ -120,6 +120,7 @@ in rec { "nixos.tests.proxy.x86_64-linux" "nixos.tests.simple.x86_64-linux" "nixpkgs.jdk.x86_64-linux" + "nixpkgs.tests.packageTestsForChannelBlockers.curl.withCheck.x86_64-linux" "nixpkgs.tarball" ]; }; diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 82975efb5917..f22bf46900ce 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -24,6 +24,14 @@ with pkgs; config = callPackage ./config.nix { }; + # we can't add 'nixpkgs.curl.tests' to hydra jobs due to 'tests' (and 'passthru') being stripped + # TODO: add a function in lib-release.nix to get derivations and add `.x86_64-linux` to them + # then we can just point release files to nixpkgs.tests.packageTestsForChannelBlockers instead of + # nixpkgs.tests.packageTestsForChannelBlockers.curl.withCheck + packageTestsForChannelBlockers = recurseIntoAttrs { + curl = recurseIntoAttrs pkgs.curl.tests; + }; + haskell = callPackage ./haskell { }; cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; }; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 05e59029f133..38861d36252e 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 @@ -61,14 +63,14 @@ assert wolfsslSupport -> wolfssl != null; assert zlibSupport -> zlib != null; assert zstdSupport -> zstd != null; -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "curl"; version = "7.84.0"; src = fetchurl { urls = [ - "https://curl.haxx.se/download/${pname}-${version}.tar.bz2" - "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] pname}-${version}/${pname}-${version}.tar.bz2" + "https://curl.haxx.se/download/curl-${finalAttrs.version}.tar.bz2" + "https://github.com/curl/curl/releases/download/curl-${finalAttrs.version}/curl-${finalAttrs.version}.tar.bz2" ]; sha256 = "sha256-cC+ybnMZCjvXcHGqFG9Qe5gXzE384hjSq4fwDNO8BZ0="; }; @@ -149,7 +151,10 @@ stdenv.mkDerivation rec { 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 '' @@ -174,16 +179,23 @@ stdenv.mkDerivation rec { ln $out/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libcurl-gnutls${stdenv.hostPlatform.extensions.sharedLibrary}.4.4.0 ''; - passthru = { + passthru = let + useThisCurl = attr: attr.override { curl = finalAttrs.finalPackage; }; + in { inherit opensslSupport openssl; tests = { - inherit curlpp coeurl; - haskell-curl = haskellPackages.curl; - ocaml-curly = ocamlPackages.curly; - php-curl = phpExtensions.curl; - pycurl = python3.pkgs.pycurl; + 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; + ocaml-curly = useThisCurl ocamlPackages.curly; + pycurl = useThisCurl python3.pkgs.pycurl; + php-curl = useThisCurl phpExtensions.curl; + # error: attribute 'override' missing # Additional checking with support http3 protocol. - inherit (nixosTests) nginx-http3; + # nginx-http3 = useThisCurl nixosTests.nginx-http3; + nginx-http3 = nixosTests.nginx-http3; }; }; @@ -196,4 +208,4 @@ stdenv.mkDerivation rec { # Fails to link against static brotli or gss broken = stdenv.hostPlatform.isStatic && (brotliSupport || gssSupport); }; -} +}) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 41c507a1aed6..ce3af252abc7 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -66,8 +66,8 @@ lib.makeScope pkgs.newScope (self: with self; { # # Build inputs is used for extra deps that may be needed. And zendExtension # will mark the extension as a zend extension or not. - mkExtension = - { name + mkExtension = lib.makeOverridable + ({ name , configureFlags ? [ "--enable-${name}" ] , internalDeps ? [ ] , postPhpize ? "" @@ -151,7 +151,7 @@ lib.makeScope pkgs.newScope (self: with self; { description = "PHP upstream extension: ${name}"; inherit (php.meta) maintainers homepage license; }; - }); + })); php = phpPackage; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index bac3d1b1171d..c2d21b196a8a 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -97,6 +97,7 @@ let jobs.lib-tests jobs.pkgs-lib-tests jobs.stdenv.x86_64-linux + jobs.tests.packageTestsForChannelBlockers.curl.withCheck.x86_64-linux jobs.cargo.x86_64-linux jobs.go.x86_64-linux jobs.linux.x86_64-linux @@ -133,6 +134,7 @@ let ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools ++ lib.optionals supportDarwin.x86_64 [ jobs.stdenv.x86_64-darwin + jobs.tests.packageTestsForChannelBlockers.curl.withCheck.x86_64-darwin jobs.cargo.x86_64-darwin jobs.cachix.x86_64-darwin jobs.go.x86_64-darwin