Unverified Commit 21de802c authored by r-vdp's avatar r-vdp
Browse files

zellij: make sure to link to our provided curl

parent 4833d971
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -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