From 8d81114a3768284574cbb4d2828dacfd9bde7d6b Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Mon, 18 Apr 2022 18:06:25 +0100 Subject: [PATCH] _7zz: build with useUasm in more platforms --- pkgs/tools/archivers/7zz/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/archivers/7zz/default.nix b/pkgs/tools/archivers/7zz/default.nix index c4ccae0272eb..144a1b275926 100644 --- a/pkgs/tools/archivers/7zz/default.nix +++ b/pkgs/tools/archivers/7zz/default.nix @@ -3,7 +3,7 @@ , fetchurl , uasm -, useUasm ? stdenv.isx86_64 +, useUasm ? stdenv.isLinux # RAR code is under non-free unRAR license # see the meta.license section below for more details @@ -13,11 +13,12 @@ let inherit (stdenv.hostPlatform) system; platformSuffix = - if useUasm then - { - x86_64-linux = "_x64"; - }.${system} or (throw "`useUasm` is not supported for system ${system}") - else ""; + lib.optionalString useUasm { + aarch64-linux = "_arm64"; + i686-linux = "_x86"; + x86_64-linux = "_x64"; + }.${system} or + (builtins.trace "7zz's ASM optimizations not available for `${system}`. Building without optimizations." ""); in stdenv.mkDerivation rec { pname = "7zz";