Skip to content

Commit

Permalink
lnav: fix cross compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
symphorien committed Dec 28, 2024
1 parent 634fd46 commit 2c7e463
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkgs/by-name/ln/lnav/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pcre2,
sqlite,
ncurses,
Expand Down Expand Up @@ -36,13 +37,21 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
separateDebugInfo = true;

patches = [
# fix cross-build of rust dependencies
# https://github.com/tstack/lnav/pull/1360
(fetchpatch {
url = "https://github.com/tstack/lnav/pull/1360/commits/2b0d2c402f4c11b31bd3dc804344f121dff4c08e.patch";
hash = "sha256-dDDc3ijEn/TbmAPxFn4bi6800cTEPoOqoXtqXq53xzo=";
})
];

strictDeps = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
autoconf
automake
zlib
curl.dev
re2c
cargo
rustPlatform.cargoSetupHook
Expand Down Expand Up @@ -76,6 +85,10 @@ stdenv.mkDerivation rec {
./autogen.sh
'';

# in cross, curl-config does not work, and ./configure does not determine
# that it needs -lcurl
configureFlags = [ "LDFLAGS=-lcurl" ];

passthru.updateScript = nix-update-script { };

meta = with lib; {
Expand Down

0 comments on commit 2c7e463

Please sign in to comment.