diff options
author | AndersonTorres <torres.anderson.85@protonmail.com> | 2021-09-08 15:51:45 -0300 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@protonmail.com> | 2021-09-09 17:48:34 -0300 |
commit | 8d06eef6552058e9e719006371c9d27bd316012a (patch) | |
tree | 9dc5740d3139fa4d4297020529ce32d3ed482f6d /pkgs | |
parent | ae19d5c68b9ec6a886826d8f9389c7f18b582546 (diff) |
atasm: init at 1.09
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/compilers/atasm/0000-file-not-found.diff | 16 | ||||
-rw-r--r-- | pkgs/development/compilers/atasm/0001-select-flags.diff | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/atasm/default.nix | 64 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 96 insertions, 0 deletions
diff --git a/pkgs/development/compilers/atasm/0000-file-not-found.diff b/pkgs/development/compilers/atasm/0000-file-not-found.diff new file mode 100644 index 0000000000000..39caaf3041749 --- /dev/null +++ b/pkgs/development/compilers/atasm/0000-file-not-found.diff @@ -0,0 +1,16 @@ +diff -Naur atasm109-old/src/Makefile atasm109-new/src/Makefile +--- atasm109-old/src/Makefile 2021-09-08 09:53:25.581598063 -0300 ++++ atasm109-new/src/Makefile 2021-09-08 09:55:20.366131338 -0300 +@@ -55,9 +55,9 @@ + chown root.root $(DESTDIR)/atasm || true + chmod 711 $(DESTDIR)/atasm + mkdir $(DOCDIR) >/dev/null 2>&1 || echo $(DOCDIR) already exists +- cp ../atasm.txt $(DOCDIR) +- chown root.root $(DOCDIR)/atasm.txt || true +- chmod 644 $(DOCDIR)/atasm.txt ++ # cp ../atasm.txt $(DOCDIR) ++ # chown root.root $(DOCDIR)/atasm.txt || true ++ # chmod 644 $(DOCDIR)/atasm.txt + sed -e 's,%%DOCDIR%%,$(DOCDIR),g' < atasm.1.in > atasm.1 + cp atasm.1 $(MANDIR) + chown root.root $(MANDIR)/atasm.1 || true diff --git a/pkgs/development/compilers/atasm/0001-select-flags.diff b/pkgs/development/compilers/atasm/0001-select-flags.diff new file mode 100644 index 0000000000000..b8fce38fcf287 --- /dev/null +++ b/pkgs/development/compilers/atasm/0001-select-flags.diff @@ -0,0 +1,14 @@ +diff -Naur atasm109-old/src/Makefile atasm109-new/src/Makefile +--- atasm109-old/src/Makefile 2021-09-08 09:53:25.581598063 -0300 ++++ atasm109-new/src/Makefile 2021-09-08 09:55:20.366131338 -0300 +@@ -16,8 +16,8 @@ + UNIX = -DUNIX + + # Compiler flags, if you are using egcs, pgcs, or gcc >2.8.1 use: +-#CFLAGS = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH) +-CFLAGS = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH) ++CFLAGS = -g -Wall $(USEZ) $(DOS) $(UNIX) $(ARCH) ++#CFLAGS = -Wall $(USEZ) $(DOS) $(UNIX) -O3 -fomit-frame-pointer $(ARCH) + + L = $(ZLIB) + CC = gcc diff --git a/pkgs/development/compilers/atasm/default.nix b/pkgs/development/compilers/atasm/default.nix new file mode 100644 index 0000000000000..74f54d8d03cfa --- /dev/null +++ b/pkgs/development/compilers/atasm/default.nix @@ -0,0 +1,64 @@ +{ lib +, stdenv +, fetchurl +, unzip +, zlib +}: + +stdenv.mkDerivation rec { + pname = "atasm"; + version = "1.09"; + + src = fetchurl { + url = "https://atari.miribilist.com/${pname}/${pname}${builtins.replaceStrings ["."] [""] version}.zip"; + hash = "sha256-26shhw2r30GZIPz6S1rf6dOLKRpgpLwrqCRZX3+8PvA="; + }; + + 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; + + nativeBuildInputs = [ + unzip + ]; + + buildInputs = [ + zlib + ]; + + preBuild = '' + makeFlagsArray+=( + -C ./src + CC=cc + USEZ="-DZLIB_CAPABLE -I${zlib}/include" + ZLIB="-L${zlib}/lib -lz" + UNIX="-DUNIX" + ) + ''; + + preInstall = '' + install -d $out/share/doc/${pname} $out/man/man1 + installFlagsArray+=( + DESTDIR=$out + DOCDIR=$out/share/doc/${pname} + MANDIR=$out/man/man1 + ) + ''; + + postInstall = '' + mv docs/* $out/share/doc/${pname} + ''; + + meta = with lib; { + homepage = "https://atari.miribilist.com/atasm/"; + description = "A commandline 6502 assembler compatible with Mac/65"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9321c3b51be0..04cc67704e456 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10828,6 +10828,8 @@ with pkgs; aspectj = callPackage ../development/compilers/aspectj { }; + atasm = callPackage ../development/compilers/atasm { }; + ats = callPackage ../development/compilers/ats { }; ats2 = callPackage ../development/compilers/ats2 { }; |