2021-06-04 09:07:49 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
|
|
|
libs-src = fetchFromGitHub {
|
|
|
|
owner = "megatokio";
|
|
|
|
repo = "Libraries";
|
2021-06-04 09:07:49 +00:00
|
|
|
# 2021-02-02
|
|
|
|
rev = "c5cb3ed512c677db6f33e2d3539dfbb6e547030b";
|
|
|
|
sha256 = "sha256-GiplhZf640uScVdKL6E/fegOgtC9SE1xgBqcX86XADk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
in
|
2021-06-04 09:07:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "zasm";
|
2021-06-04 09:07:49 +00:00
|
|
|
version = "4.4.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "megatokio";
|
|
|
|
repo = "zasm";
|
2021-06-04 09:07:49 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-Zbno8kmzss1H2FjwzHB4U7UXxa6oDfsPV80MVVFfM68=";
|
2022-06-16 17:23:12 +00:00
|
|
|
postFetch = ''
|
2021-06-04 09:07:49 +00:00
|
|
|
# remove folder containing files with weird names (causes the hash to turn out differently under macOS vs. Linux)
|
|
|
|
rm -rv $out/Test
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
ln -sf ${libs-src} Libraries
|
|
|
|
'';
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
"CXX=${stdenv.cc.targetPrefix}c++"
|
|
|
|
"LINK=${stdenv.cc.targetPrefix}c++"
|
|
|
|
"STRIP=${stdenv.cc.targetPrefix}strip"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-04 09:07:49 +00:00
|
|
|
install -Dm755 -t $out/bin zasm
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-06-04 09:07:49 +00:00
|
|
|
description = "Z80 / 8080 / Z180 assembler (for unix-style OS)";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = [ maintainers.turbomack ];
|
2021-06-04 09:07:49 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
badPlatforms = platforms.aarch64;
|
|
|
|
};
|
|
|
|
}
|