From c96139b57973ca35da4d1496fc1802b00691c75a Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 4 Mar 2024 15:57:17 +0000 Subject: [PATCH] build: do not vendor OpenSSL when cross-compiling (#5316) Compilation of vendored OpenSSL inside Nix is broken since due to build script changes. There is anyway no need to compile vendored OpenSSL as nixpkgs already contains OpenSSL package. This fixes `nix build .#deltachat-rpc-server-x86_64-linux` and similar commands which are used during releases. --- flake.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 2d6889eba9..049a36b649 100644 --- a/flake.nix +++ b/flake.nix @@ -165,9 +165,6 @@ version = manifest.version; strictDeps = true; src = pkgs.lib.cleanSource ./.; - nativeBuildInputs = [ - pkgs.perl # Needed to build vendored OpenSSL. - ]; auditable = false; # Avoid cargo-auditable failures. doCheck = false; # Disable test as it requires network access. @@ -180,6 +177,11 @@ CC = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc"; LD = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc"; + + OPENSSL_LIB_DIR = "${pkgsCross.pkgsStatic.openssl.out}/lib"; + OPENSSL_INCLUDE_DIR = "${pkgsCross.pkgsStatic.openssl.dev}/include"; + OPENSSL_STATIC = "1"; + OPENSSL_NO_VENDOR = "1"; }; mk-aarch64-RustPackage = mkCrossRustPackage "aarch64-unknown-linux-musl" "aarch64-unknown-linux-musl";