Skip to content

Commit 3c94728

Browse files
committed
build: do not vendor OpenSSL when cross-compiling
Compilation of vendored OpenSSL inside Nix is broken since <alexcrichton/openssl-src-rs#229> 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.
1 parent db0143f commit 3c94728

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

flake.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@
165165
version = manifest.version;
166166
strictDeps = true;
167167
src = pkgs.lib.cleanSource ./.;
168-
nativeBuildInputs = [
169-
pkgs.perl # Needed to build vendored OpenSSL.
170-
];
171168
auditable = false; # Avoid cargo-auditable failures.
172169
doCheck = false; # Disable test as it requires network access.
173170

@@ -180,6 +177,11 @@
180177

181178
CC = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
182179
LD = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
180+
181+
OPENSSL_LIB_DIR = "${pkgsCross.pkgsStatic.openssl.out}/lib";
182+
OPENSSL_INCLUDE_DIR = "${pkgsCross.pkgsStatic.openssl.dev}/include";
183+
OPENSSL_STATIC = "1";
184+
OPENSSL_NO_VENDOR = "1";
183185
};
184186

185187
mk-aarch64-RustPackage = mkCrossRustPackage "aarch64-unknown-linux-musl" "aarch64-unknown-linux-musl";

0 commit comments

Comments
 (0)