From 2d587a560397d4e33019423249b1bb988d812de3 Mon Sep 17 00:00:00 2001 From: matthiasdotsh Date: Wed, 17 Dec 2025 09:05:12 +0100 Subject: [PATCH] lgpio: Fix cross-compilation build The upstream Makefile [1] supports the CROSS_PREFIX variable to specify the cross-compiler toolchain prefix. Without this, the build fails when cross-compiling (e.g., for aarch64-multiplatform) because it tries to use the native 'gcc' instead of the target compiler. This fix allows building lgpio for other architectures using pkgsCross. [1] https://github.com/joan2937/lg/blob/v0.2.2/Makefile#L4 --- pkgs/by-name/lg/lgpio/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/lg/lgpio/package.nix b/pkgs/by-name/lg/lgpio/package.nix index 73d8c4853d1e..21051bcfa660 100644 --- a/pkgs/by-name/lg/lgpio/package.nix +++ b/pkgs/by-name/lg/lgpio/package.nix @@ -55,6 +55,7 @@ mkDerivation rec { makeFlags = [ "prefix=$(out)" + "CROSS_PREFIX=${stdenv.cc.targetPrefix}" ]; meta = {