From 27aca32b280a1a6875ece9696946eb32819038c5 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Fri, 4 Apr 2025 12:00:00 +0000 Subject: [PATCH] lnav: fix cross the autoconf build system does not pass --target to cargo when compiling the rust-based prql support into lnav, so cross compilation fails. --- pkgs/by-name/ln/lnav/package.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/ln/lnav/package.nix b/pkgs/by-name/ln/lnav/package.nix index 3cf636be8240..8b152bd7df8f 100644 --- a/pkgs/by-name/ln/lnav/package.nix +++ b/pkgs/by-name/ln/lnav/package.nix @@ -20,6 +20,7 @@ rustPlatform, rustc, libunistring, + prqlSupport ? stdenv.hostPlatform == stdenv.buildPlatform, }: stdenv.mkDerivation (finalAttrs: { @@ -41,16 +42,19 @@ stdenv.mkDerivation (finalAttrs: { depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ - autoconf - automake - zlib - curl.dev - re2c - cargo - rustPlatform.cargoSetupHook - rustc - ]; + nativeBuildInputs = + [ + autoconf + automake + zlib + curl.dev + re2c + ] + ++ lib.optionals prqlSupport [ + cargo + rustPlatform.cargoSetupHook + rustc + ]; buildInputs = [