From 72635ede98f767e9bfd59dde6bab6b3b72443a32 Mon Sep 17 00:00:00 2001 From: David Guibert Date: Fri, 29 Apr 2022 09:58:01 +0200 Subject: [PATCH] workaround nixpkgs 144747 (updated) --- nixpkgs/overlay.nix | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/nixpkgs/overlay.nix b/nixpkgs/overlay.nix index 694fd2e..9379f1c 100644 --- a/nixpkgs/overlay.nix +++ b/nixpkgs/overlay.nix @@ -22,6 +22,70 @@ with pkgs; doInstallCheck = false; }); + # `fetchurl' downloads a file from the network. + fetchurl = if stdenv.buildPlatform != stdenv.hostPlatform + then buildPackages.fetchurl # No need to do special overrides twice, + else makeOverridable (import (pkgs.path + "/pkgs/build-support/fetchurl")) { + inherit lib stdenvNoCC buildPackages; + inherit cacert; + curl = buildPackages.curlMinimal.override (old: rec { + # break dependency cycles + fetchurl = stdenv.fetchurlBoot; + zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; }; + pkg-config = buildPackages.pkg-config.override (old: { + pkg-config = old.pkg-config.override { + fetchurl = stdenv.fetchurlBoot; + }; + }); + perl = buildPackages.perl.override { fetchurl = stdenv.fetchurlBoot; inherit zlib; }; + openssl = buildPackages.openssl.override { + fetchurl = stdenv.fetchurlBoot; + buildPackages = { + coreutils = (buildPackages.coreutils.override rec { + fetchurl = stdenv.fetchurlBoot; + inherit perl; + xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; }; + gmp = null; + aclSupport = false; + attrSupport = false; + autoreconfHook = null; # workaround nixpkgs #144747 + texinfo = null; + }).overrideAttrs (_: { + preBuild = "touch Makefile.in"; # avoid automake + }); + inherit perl; + }; + inherit perl; + }; + libssh2 = buildPackages.libssh2.override { + fetchurl = stdenv.fetchurlBoot; + inherit zlib openssl; + }; + # On darwin, libkrb5 needs bootstrap_cmds which would require + # converting many packages to fetchurl_boot to avoid evaluation cycles. + # So turn gssSupport off there, and on Windows. + # On other platforms, keep the previous value. + gssSupport = + if stdenv.isDarwin || stdenv.hostPlatform.isWindows + then false + else old.gssSupport or true; # `? true` is the default + libkrb5 = buildPackages.libkrb5.override { + fetchurl = stdenv.fetchurlBoot; + inherit pkg-config perl openssl; + keyutils = buildPackages.keyutils.override { fetchurl = stdenv.fetchurlBoot; }; + }; + nghttp2 = buildPackages.nghttp2.override { + fetchurl = stdenv.fetchurlBoot; + inherit pkg-config; + enableApp = false; # curl just needs libnghttp2 + enableTests = false; # avoids bringing `cunit` and `tzdata` into scope + }; + }); + }; git = git.overrideAttrs (old: { + doCheck = false; # failure + doInstallCheck = false; # failure + }); + gtk3 = gtk3.override { trackerSupport = false; }; @@ -57,3 +121,4 @@ with pkgs; "-DEMBREE_ISA_SSE42=OFF"]; }); } +