Skip to content

Commit 21de802

Browse files
committed
zellij: make sure to link to our provided curl
1 parent 4833d97 commit 21de802

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pkgs/tools/misc/zellij/default.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
, stdenv
55
, installShellFiles
66
, pkg-config
7+
, curl
78
, openssl
89
, mandown
910
, zellij
@@ -25,20 +26,38 @@ rustPlatform.buildRustPackage rec {
2526

2627
env.OPENSSL_NO_VENDOR = 1;
2728

29+
# Workaround for https://github.com/zellij-org/zellij/issues/3720
30+
postPatch = ''
31+
substituteInPlace zellij-utils/Cargo.toml \
32+
--replace-fail 'isahc = "1.7.2"' 'isahc = { version = "1.7.2", default-features = false, features = ["http2", "text-decoding"] }'
33+
'';
34+
2835
nativeBuildInputs = [
2936
mandown
3037
installShellFiles
3138
pkg-config
39+
(lib.getDev curl)
3240
];
3341

3442
buildInputs = [
43+
curl
3544
openssl
3645
];
3746

3847
preCheck = ''
3948
HOME=$TMPDIR
4049
'';
4150

51+
# Ensure that we don't vendor curl, but instead link against the libcurl from nixpkgs
52+
doInstallCheck = stdenv.hostPlatform.libc == "glibc";
53+
installCheckPhase = ''
54+
runHook preInstallCheck
55+
56+
ldd "$out/bin/zellij" | grep libcurl.so
57+
58+
runHook postInstallCheck
59+
'';
60+
4261
postInstall = ''
4362
mandown docs/MANPAGE.md > zellij.1
4463
installManPage zellij.1

0 commit comments

Comments
 (0)