From 21de802c9f23bb75a02a737aaf928200c10fba3d Mon Sep 17 00:00:00 2001 From: r-vdp Date: Thu, 7 Nov 2024 10:06:13 +0100 Subject: [PATCH] zellij: make sure to link to our provided curl --- pkgs/tools/misc/zellij/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/tools/misc/zellij/default.nix b/pkgs/tools/misc/zellij/default.nix index 5aa3aabf8afb..adc720ec3f66 100644 --- a/pkgs/tools/misc/zellij/default.nix +++ b/pkgs/tools/misc/zellij/default.nix @@ -4,6 +4,7 @@ , stdenv , installShellFiles , pkg-config +, curl , openssl , mandown , zellij @@ -25,13 +26,21 @@ rustPlatform.buildRustPackage rec { env.OPENSSL_NO_VENDOR = 1; + # Workaround for https://github.com/zellij-org/zellij/issues/3720 + postPatch = '' + substituteInPlace zellij-utils/Cargo.toml \ + --replace-fail 'isahc = "1.7.2"' 'isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }' + ''; + nativeBuildInputs = [ mandown installShellFiles pkg-config + (lib.getDev curl) ]; buildInputs = [ + curl openssl ]; @@ -39,6 +48,16 @@ rustPlatform.buildRustPackage rec { HOME=$TMPDIR ''; + # Ensure that we don't vendor curl, but instead link against the libcurl from nixpkgs + doInstallCheck = stdenv.hostPlatform.libc == "glibc"; + installCheckPhase = '' + runHook preInstallCheck + + ldd "$out/bin/zellij" | grep libcurl.so + + runHook postInstallCheck + ''; + postInstall = '' mandown docs/MANPAGE.md > zellij.1 installManPage zellij.1