2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rasm";
|
|
|
|
version = "0.117";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-24 12:14:16 +00:00
|
|
|
url = "http://www.roudoudou.com/export/cpc/rasm/${pname}_v0117_src.zip";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1hwily4cfays59qm7qd1ax48i7cpbxhs5l9mfpyn7m2lxsfqrl3z";
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# according to official documentation
|
2021-03-09 03:18:52 +00:00
|
|
|
${stdenv.cc.targetPrefix}cc rasm_v*.c -O2 -lm -o rasm
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dt $out/bin rasm
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.roudoudou.com/rasm/";
|
|
|
|
description = "Z80 assembler";
|
|
|
|
# use -n option to display all licenses
|
|
|
|
license = licenses.mit; # expat version
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = [ ];
|
2021-03-09 03:18:52 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|