From e091693f131b3e23ff8debf943f1606e79ca1232 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Wed, 11 Jan 2023 21:06:22 +0100 Subject: [PATCH] cargo: fix cross-compilation by adding missing zlib dependency Previously it was failing with: Compiling cargo v0.67.1 (/build/rustc-1.66.1-src/src/tools/cargo) error: linking with `/nix/store/gcc-wrapper-11.3.0/bin/cc` failed: exit status: 1 | = note: /nix/store/binutils-2.39/bin/ld: skipping incompatible /nix/store/zlib-aarch64-unknown-linux-gnu-1.2.13/lib/libz.so when searching for -lz /nix/store/binutils-2.39/bin/ld: cannot find -lz: No such file or directory /nix/store/binutils-2.39/bin/ld: skipping incompatible /nix/store/zlib-aarch64-unknown-linux-gnu-1.2.13/lib/libz.so when searching for -lz collect2: error: ld returned 1 exit status --- pkgs/development/compilers/rust/cargo.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 291a64f2210ca..9b10767e5bff7 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -26,6 +26,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config cmake installShellFiles makeWrapper (lib.getDev pkgsHostHost.curl) + zlib ]; buildInputs = [ cacert file curl python3 openssl zlib ] ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];