From bdcaa990de758a33a457c4170312d5d287948492 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:10:44 +0100 Subject: [PATCH] zenith: unbreak on aarch64 platforms --- pkgs/tools/system/zenith/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/zenith/default.nix b/pkgs/tools/system/zenith/default.nix index 57d0f548f00e..282bd31571d9 100644 --- a/pkgs/tools/system/zenith/default.nix +++ b/pkgs/tools/system/zenith/default.nix @@ -8,6 +8,8 @@ , llvmPackages }: +assert nvidiaSupport -> stdenv.isLinux; + rustPlatform.buildRustPackage rec { pname = "zenith"; version = "0.13.1"; @@ -19,6 +21,11 @@ rustPlatform.buildRustPackage rec { sha256 = "sha256-N/DvPVYGM/DjTvKvOlR60q6rvNyfAQlnvFnFG5nbUmQ="; }; + # remove cargo config so it can find the linker on aarch64-linux + postPatch = '' + rm .cargo/config + ''; + cargoSha256 = "sha256-Y/vvRJpv82Uc+Bu3lbZxRsu4TL6sAjz5AWHAHkwh98Y="; nativeBuildInputs = [ llvmPackages.clang ] ++ lib.optional nvidiaSupport makeWrapper; @@ -39,8 +46,6 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/bvaisvil/zenith"; license = licenses.mit; maintainers = with maintainers; [ bbigras ]; - # doesn't build on aarch64 https://github.com/bvaisvil/zenith/issues/19 - # see https://github.com/NixOS/nixpkgs/pull/88616 - platforms = platforms.x86; + platforms = platforms.unix; }; }