Merge pull request #169219 from thiagokokada/bump-uasm

uasm: 2.53 -> 2.55; _7zz: build with useUasm in more platforms
This commit is contained in:
Thiago Kenji Okada
2022-04-18 20:24:51 +01:00
committed by GitHub
2 changed files with 14 additions and 26 deletions
+7 -20
View File
@@ -2,31 +2,18 @@
stdenv.mkDerivation rec {
pname = "uasm";
version = "2.53";
version = "2.55";
src = fetchFromGitHub {
owner = "Terraspace";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Aohwrcb/KTKUFFpfmqVDPNjJh1dMYSNnBJ2eFaP20pM=";
# Specifying only the tag results in the following error during download:
# the given path has multiple possibilities: #<Git::Ref:0x00007f618689c378>, #<Git::Ref:0x00007f618689c1e8>
# Probably because upstream has both a tag and a branch with the same name
rev = "refs/tags/v${version}";
sha256 = "sha256-CIbHPKJa60SyJeFgF1Tux7RfJZBChhUVXR7HGa+gCtQ=";
};
# https://github.com/Terraspace/UASM/pull/154
patches = [
# fix `invalid operands to binary - (have 'char *' and 'uint_8 *' {aka 'unsigned char *'})`
(fetchpatch {
name = "fix_pointers_compare.patch";
url = "https://github.com/clouds56/UASM/commit/9cd3a400990e230571e06d4c758bd3bd35f90ab6.patch";
sha256 = "sha256-8mY36dn+g2QNJ1JbWt/y4p0Ha9RSABnOE3vlWANuhsA=";
})
# fix `dbgcv.c:*:*: fatal error: direct.h: No such file or directory`
(fetchpatch {
name = "fix_build_dbgcv_c_on_unix.patch";
url = "https://github.com/clouds56/UASM/commit/806d54cf778246c96dcbe61a4649bf0aebcb0eba.patch";
sha256 = "sha256-uc1LaizdYEh1Ry55Cq+6wrCa1OeBPFo74H5iBpmteAE=";
})
];
enableParallelBuilding = true;
makefile = "gccLinux64.mak";
@@ -43,7 +30,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "http://www.terraspace.co.uk/uasm.html";
description = "A free MASM-compatible assembler based on JWasm";
platforms = [ "x86_64-linux" ];
platforms = platforms.linux;
maintainers = with maintainers; [ thiagokokada ];
license = licenses.watcom;
};
+7 -6
View File
@@ -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";