9 stdenv.mkDerivation (finalAttrs: {
11 version = "142-bld232";
15 inherit (finalAttrs) pname version;
18 name = "${pname}-${version}";
19 url = "http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/asl-current-${version}.tar.bz2";
20 hash = "sha256-Q50GzXBxFMhbt5s9OgHPNH4bdqz2hhEmTnMmKowVn2E=";
29 nativeBuildInputs = lib.optionals buildDocs [ texliveMedium ];
32 lib.optionalString (!buildDocs) ''
33 substituteInPlace Makefile --replace "all: binaries docs" "all: binaries"
35 + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
36 substituteInPlace sysdefs.h --replace "x86_64" "aarch64"
42 bindir="${placeholder "out"}/bin" \
43 docdir="${placeholder "doc"}/share/doc/asl" \
44 incdir="${placeholder "out"}/include/asl" \
45 libdir="${placeholder "out"}/lib/asl" \
46 mandir="${placeholder "man"}/share/man" \
47 substituteAll ${./Makefile-nixos.def} Makefile.def
52 homepage = "http://john.ccac.rwth-aachen.de:8000/as/index.html";
53 description = "Portable macro cross assembler";
55 AS is a portable macro cross assembler for a variety of microprocessors
56 and -controllers. Though it is mainly targeted at embedded processors and
57 single-board computers, you also find CPU families in the target list that
58 are used in workstations and PCs.
60 license = licenses.gpl2Plus;
61 maintainers = with maintainers; [ AndersonTorres ];
62 platforms = platforms.unix;
65 # TODO: cross-compilation support
66 # TODO: customize TeX input
67 # TODO: report upstream about `mkdir -p .objdir/`
68 # TODO: suggest upstream about building docs as an option