From 89afe706797a64bebddc558e7b50d2862c15a40e Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Wed, 5 Oct 2022 13:49:08 -0400 Subject: [PATCH] libraspberrypi: build all binaries on 32-bit ARM This package included a patch which accidently disabled the applications which can only be built for 32-bit ARM on all platforms (including 32-bit ARM). There is a newer version of the patch available in the upstream PR which can avoid this problem, but I don't think the patch is truly necessary at all. We can simply pass -DARM64=ON on all platforms except 32-bit ARM to get the same effect. --- .../development/libraries/libraspberrypi/default.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/libraspberrypi/default.nix b/pkgs/development/libraries/libraspberrypi/default.nix index bc0ae86aec3..14f02d8481e 100644 --- a/pkgs/development/libraries/libraspberrypi/default.nix +++ b/pkgs/development/libraries/libraspberrypi/default.nix @@ -16,17 +16,11 @@ stdenv.mkDerivation rec { hash = "sha512-f7tBgIykcIdkwcFjBKk5ooD/5Bsyrd/0OFr7LNCwWFYeE4DH3XA7UR7YjArkwqUVCVBByr82EOaacw0g1blOkw=="; }; - patches = [ - (fetchpatch { - # https://github.com/raspberrypi/userland/pull/670 - url = "https://github.com/raspberrypi/userland/commit/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch"; - sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw"; - }) - ]; - nativeBuildInputs = [ cmake pkg-config ]; cmakeFlags = [ - (if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF") + # -DARM64=ON disables all targets that only build on 32-bit ARM; this allows + # the package to build on aarch64 and other architectures + "-DARM64=${if stdenv.hostPlatform.isAarch32 then "OFF" else "ON"}" "-DVMCS_INSTALL_PREFIX=${placeholder "out"}" ];