mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
_7zz: useUasm only in x86 platforms
`uasm` is x86 only. It seems that in `aarch64-linux` at least, the optimizing build is done without using any third-party tool (maybe using GCC's own assembly?).
This commit is contained in:
parent
e277cf18e2
commit
21a40059dd
@ -2,23 +2,27 @@
|
|||||||
, lib
|
, lib
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
|
||||||
|
# Only used for x86/x86_64
|
||||||
, uasm
|
, uasm
|
||||||
, useUasm ? stdenv.isLinux
|
, useUasm ? stdenv.hostPlatform.isx86
|
||||||
|
|
||||||
# RAR code is under non-free unRAR license
|
# RAR code is under non-free unRAR license
|
||||||
# see the meta.license section below for more details
|
# see the meta.license section below for more details
|
||||||
, enableUnfree ? false
|
, enableUnfree ? false
|
||||||
|
|
||||||
|
# For tests
|
||||||
|
, _7zz
|
||||||
|
, testVersion
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
platformSuffix =
|
platformSuffix = {
|
||||||
lib.optionalString useUasm {
|
aarch64-linux = "_arm64";
|
||||||
aarch64-linux = "_arm64";
|
i686-linux = "_x86";
|
||||||
i686-linux = "_x86";
|
x86_64-linux = "_x64";
|
||||||
x86_64-linux = "_x64";
|
}.${system} or
|
||||||
}.${system} or
|
(builtins.trace "`platformSuffix` not available for `${system}.` Making a generic `7zz` build." "");
|
||||||
(builtins.trace "7zz's ASM optimizations not available for `${system}`. Building without optimizations." "");
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "7zz";
|
pname = "7zz";
|
||||||
@ -73,17 +77,13 @@ stdenv.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
passthru = {
|
||||||
|
updateScript = ./update.sh;
|
||||||
installCheckPhase = ''
|
tests.version = testVersion {
|
||||||
runHook preInstallCheck
|
package = _7zz;
|
||||||
|
command = "7zz --help";
|
||||||
$out/bin/7zz --help | grep ${version}
|
};
|
||||||
|
};
|
||||||
runHook postInstallCheck
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru.updateScript = ./update.sh;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Command line archiver utility";
|
description = "Command line archiver utility";
|
||||||
|
Loading…
Reference in New Issue
Block a user