Skip to content

Commit

Permalink
build: revert to OpenSSL 3.1
Browse files Browse the repository at this point in the history
OpenSSL 3.2 build currently fails under Nix
so we cannot build deltachat-rpc-server releases:
<alexcrichton/openssl-src-rs#235>
  • Loading branch information
link2xt committed Mar 5, 2024
1 parent ea728e9 commit 215ec14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ toml = "0.8"
url = "2"
uuid = { version = "1", features = ["serde", "v4"] }

# Pin OpenSSL to 3.1 releases.
# OpenSSL 3.2 has a regression tracked at <https://github.com/openssl/openssl/issues/23376>
# which results in broken `deltachat-rpc-server` binaries when cross-compiled using Zig toolchain.
# See <https://github.com/deltachat/deltachat-core-rust/issues/5206> for Delta Chat issue.
# According to <https://www.openssl.org/policies/releasestrat.html>
# 3.1 branch will be supported until 2025-03-14.
openssl-src = "~300.1"

[dev-dependencies]
ansi_term = "0.12.0"
anyhow = { version = "1", features = ["backtrace"] } # Enable `backtrace` feature in tests.
Expand Down
8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
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.

Expand All @@ -177,11 +180,6 @@

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";
Expand Down

0 comments on commit 215ec14

Please sign in to comment.