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