2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-18 10:52:07 +00:00
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "atasm";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.23";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CycoPH";
|
|
|
|
repo = "atasm";
|
|
|
|
rev = "V${version}";
|
|
|
|
hash = "sha256-U1HNYTiXO6WZEQJl2icY0ZEVy82CsL1mKR7Xgj9OZ14=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
makefile = "Makefile";
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
patches = [
|
|
|
|
# make install fails because atasm.txt was moved; report to upstream
|
|
|
|
./0000-file-not-found.diff
|
|
|
|
# select flags for compilation
|
|
|
|
./0001-select-flags.diff
|
|
|
|
];
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=(
|
|
|
|
-C ./src
|
|
|
|
CC=cc
|
|
|
|
USEZ="-DZLIB_CAPABLE -I${zlib}/include"
|
|
|
|
ZLIB="-L${zlib}/lib -lz"
|
|
|
|
UNIX="-DUNIX"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
mkdir -p $out/bin/
|
2021-09-18 10:52:07 +00:00
|
|
|
install -d $out/share/doc/${pname} $out/man/man1
|
|
|
|
installFlagsArray+=(
|
2024-04-21 15:54:59 +00:00
|
|
|
DESTDIR=$out/bin/
|
2021-09-18 10:52:07 +00:00
|
|
|
DOCDIR=$out/share/doc/${pname}
|
|
|
|
MANDIR=$out/man/man1
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv docs/* $out/share/doc/${pname}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://github.com/CycoPH/atasm";
|
2021-09-18 10:52:07 +00:00
|
|
|
description = "A commandline 6502 assembler compatible with Mac/65";
|
|
|
|
license = licenses.gpl2Plus;
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/CycoPH/atasm/releases/tag/V${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|