git.iko.soy/typeable/nixpkgs
on master help sign in
asl: init at 142-bld211
commit2b6ba95a192dca9c1df0e8ccceffdfd085aced05 authorAndersonTorres <torres.anderson.85@protonmail.com> dateMon 1 Nov 2021, 20:12 (5 years ago) parentb5626d1
3 files changed+92
pkgs/development/compilers/asl/Makefile-nixos.def+31 pkgs/development/compilers/asl/default.nix+57 pkgs/top-level/all-packages.nix+4
pkgs/development/compilers/asl/Makefile-nixos.defnew file+31
@@ -0,0 +1,31 @@
1+# -------------------------------------------------------------------------
2+# choose your compiler (must be ANSI-compliant!) and linker command, plus
3+# any additionally needed flags
4+
5+OBJDIR = .objdir/
6+CC = cc
7+CFLAGS = -g -fomit-frame-pointer -Wall
8+HOST_OBJEXTENSION = .o
9+LD = $(CC)
10+LDFLAGS =
11+HOST_EXEXTENSION =
12+
13+# no cross build
14+
15+TARG_OBJDIR = $(OBJDIR)
16+TARG_CC = $(CC)
17+TARG_CFLAGS = $(CFLAGS)
18+TARG_OBJEXTENSION = $(HOST_OBJEXTENSION)
19+TARG_LD = $(LD)
20+TARG_LDFLAGS = $(LDFLAGS)
21+TARG_EXEXTENSION = $(HOST_EXEXTENSION)
22+
23+# -------------------------------------------------------------------------
24+# directories where binaries, includes, and manpages should go during
25+# installation
26+
27+BINDIR = @bindir@
28+INCDIR = @incdir@
29+MANDIR = @mandir@
30+LIBDIR = @libdir@
31+DOCDIR = @docdir@
pkgs/development/compilers/asl/default.nixnew file+57
@@ -0,0 +1,57 @@
1+{ lib
2+, stdenv
3+, fetchzip
4+, buildDocs? false, tex
5+}:
6+
7+stdenv.mkDerivation rec {
8+ pname = "asl";
9+ version = "142-bld211";
10+
11+ src = fetchzip {
12+ name = "${pname}-${version}";
13+ url = "http://john.ccac.rwth-aachen.de:8000/ftp/as/source/c_version/asl-current-${version}.tar.bz2";
14+ hash = "sha256-Sbm16JX7kC/7Ws7YgNBUXNqOCl6u+RXgfNjTODhCzSM=";
15+ };
16+
17+ nativeBuildInputs = lib.optional buildDocs [ tex ];
18+
19+ postPatch = lib.optionalString (!buildDocs) ''
20+ substituteInPlace Makefile --replace "all: binaries docs" "all: binaries"
21+ '';
22+
23+ dontConfigure = true;
24+
25+ preBuild = ''
26+ bindir="${placeholder "out"}/bin" \
27+ docdir="${placeholder "out"}/doc/asl" \
28+ incdir="${placeholder "out"}/include/asl" \
29+ libdir="${placeholder "out"}/lib/asl" \
30+ mandir="${placeholder "out"}/share/man" \
31+ substituteAll ${./Makefile-nixos.def} Makefile.def
32+ mkdir -p .objdir
33+ '';
34+
35+ hardenedDisable = [ "all" ];
36+
37+ # buildTargets = [ "binaries" "docs" ];
38+
39+ meta = with lib; {
40+ homepage = "http://john.ccac.rwth-aachen.de:8000/as/index.html";
41+ description = "Portable macro cross assembler";
42+ longDescription = ''
43+ AS is a portable macro cross assembler for a variety of microprocessors
44+ and -controllers. Though it is mainly targeted at embedded processors and
45+ single-board computers, you also find CPU families in the target list that
46+ are used in workstations and PCs.
47+ '';
48+ license = licenses.gpl2Plus;
49+ maintainers = with maintainers; [ AndersonTorres ];
50+ platforms = platforms.unix;
51+ };
52+}
53+# TODO: multiple outputs
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
pkgs/top-level/all-packages.nix+4
@@ -11278,6 +11278,10 @@ with pkgs;
1127811278
1127911279 as31 = callPackage ../development/compilers/as31 { };
1128011280
11281+ asl = callPackage ../development/compilers/asl {
11282+ tex = texlive.combined.scheme-medium;
11283+ };
11284+
1128111285 asn1c = callPackage ../development/compilers/asn1c { };
1128211286
1128311287 aspectj = callPackage ../development/compilers/aspectj { };