nixpkgs/pkgs/development/compilers/uasm/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.6 KiB
Nix
Raw Normal View History

2022-04-18 22:33:19 +00:00
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, testers
2022-04-18 22:33:19 +00:00
, uasm
}:
2022-01-29 18:46:14 +00:00
stdenv.mkDerivation rec {
pname = "uasm";
2023-01-07 13:37:16 +00:00
version = "2.56.2";
2022-01-29 18:46:14 +00:00
src = fetchFromGitHub {
owner = "Terraspace";
repo = pname;
# 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}";
2023-01-07 13:37:16 +00:00
hash = "sha256-QiRBscY6zefeLDDVhS/+j9yIJ+5QhgkDQh1CLl/CslM=";
2022-01-29 18:46:14 +00:00
};
2023-01-07 13:37:16 +00:00
patches = [
2022-04-18 21:33:05 +00:00
(fetchpatch {
name = "fix-v2_55-compilation-on-macos.patch";
url = "https://github.com/Terraspace/UASM/commit/b50c430cc3083c7f32e288a9f64fe1cafb03091d.patch";
sha256 = "sha256-FGFB282LSEKtGD1cIRH+Qi5bye5Gx4xb0Ty4J03xjCU";
})
];
2022-01-29 18:46:14 +00:00
enableParallelBuilding = true;
2022-04-18 21:33:05 +00:00
makefile =
if stdenv.isDarwin then
"ClangOSX64.mak"
else
"gccLinux64.mak";
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
2022-01-29 18:46:14 +00:00
installPhase = ''
runHook preInstall
install -Dt "$out/bin" -m0755 GccUnixR/uasm
install -Dt "$out/share/doc/${pname}" -m0644 {Readme,History}.txt Doc/*
runHook postInstall
'';
passthru.tests.version = testers.testVersion {
2022-04-18 22:33:19 +00:00
package = uasm;
command = "uasm -h";
version = "v${version}";
};
2022-01-29 18:46:14 +00:00
meta = with lib; {
homepage = "http://www.terraspace.co.uk/uasm.html";
description = "A free MASM-compatible assembler based on JWasm";
2022-04-18 21:33:05 +00:00
platforms = platforms.unix;
2022-01-29 18:46:14 +00:00
maintainers = with maintainers; [ thiagokokada ];
license = licenses.watcom;
};
}