From 30dba16f24aea699a3daf9b2409c4698819f29ce Mon Sep 17 00:00:00 2001 From: curoky Date: Fri, 2 Oct 2026 14:18:36 +0800 Subject: [PATCH] libewf: fix same-architecture cross compilation Autoconf determines cross compilation from differing build and host triples. buildPlatform.canExecute hostPlatform remains true for same-architecture crosses such as x86_64-linux-gnu to x86_64-linux-musl, so the OpenSSL XTS runtime probe is not cached and configure aborts. Check whether buildPlatform and hostPlatform differ instead so all cross builds receive the cached result. Assisted-by: TraeCode (GPT-5) --- pkgs/by-name/li/libewf/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libewf/package.nix b/pkgs/by-name/li/libewf/package.nix index 179bbd1da2d3..eccdff0594fe 100644 --- a/pkgs/by-name/li/libewf/package.nix +++ b/pkgs/by-name/li/libewf/package.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals stdenv.hostPlatform.isDarwin [ bzip2 ]; # cannot run test program while cross compiling - configureFlags = lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ + configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_openssl_xts_duplicate_keys=yes" ];