gnu: igt-gpu-tools: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / assembly.scm
CommitLineData
8472bdec
JN
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
c283b22e 3;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
15a3fffc
LC
4;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
5;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
e51b3145 6;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
9a2e4c5d 7;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
8472bdec
JN
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages assembly)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix download)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
a837997c 29 #:use-module (gnu packages)
b6e08049 30 #:use-module (gnu packages compression)
8472bdec 31 #:use-module (gnu packages perl)
15a3fffc
LC
32 #:use-module (gnu packages texinfo)
33 #:use-module (gnu packages python)
9a2e4c5d 34 #:use-module (gnu packages xml)
35 #:use-module ((guix utils)
36 #:select (%current-system)))
8472bdec
JN
37
38(define-public nasm
39 (package
40 (name "nasm")
e51b3145 41 (version "2.13.03")
8472bdec
JN
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
45 version "/" name "-" version ".tar.xz"))
46 (sha256
47 (base32
e51b3145 48 "0wr58pb2wnyihcl6635hlx98fnscx5yirxm8m84x8nxwvjqcybl1"))))
8472bdec 49 (build-system gnu-build-system)
a837997c 50 (native-inputs `(("perl" ,perl) ;for doc and test target
8472bdec
JN
51 ("texinfo" ,texinfo)))
52 (arguments
53 `(#:test-target "test"
161fb9be
EF
54 #:phases
55 (modify-phases %standard-phases
56 (add-after 'unpack 'dont-build-ps-pdf-outputs
57 (lambda _
58 (substitute* "doc/Makefile.in"
3f56740d
MB
59 (("html nasmdoc.txt nasmdoc.pdf")
60 "html nasmdoc.txt")
61 (("\\$\\(INSTALL_DATA\\) nasmdoc.pdf")
62 "$(INSTALL_DATA)"))
161fb9be
EF
63 #t))
64 (add-after 'install 'install-info
65 (lambda _
4792cc86 66 (invoke "make" "install_doc"))))))
80459f5a 67 (home-page "https://www.nasm.us/")
8472bdec
JN
68 (synopsis "80x86 and x86-64 assembler")
69 (description
70 "NASM, the Netwide Assembler, is an 80x86 and x86-64 assembler designed
71for portability and modularity. It supports a range of object file formats,
72including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ,
73Windows32 and Windows64. It will also output plain binary files. Its syntax
74is designed to be simple and easy to understand, similar to Intel's but less
75complex. It supports all currently known x86 architectural extensions, and
76has strong support for macros.")
1d7fbe09 77 (license license:bsd-2)))
15a3fffc
LC
78
79(define-public yasm
80 (package
81 (name "yasm")
82 (version "1.3.0")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append
86 "http://www.tortall.net/projects/yasm/releases/yasm-"
87 version ".tar.gz"))
88 (sha256
89 (base32
90 "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix"))))
91 (build-system gnu-build-system)
92 (inputs
93 `(("python" ,python-wrapper)
94 ("xmlto" ,xmlto)))
95 (home-page "http://yasm.tortall.net/")
96 (synopsis "Rewrite of the NASM assembler")
97 (description
98 "Yasm is a complete rewrite of the NASM assembler.
99
100Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM
101and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit
102Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source
103debugging information in STABS, DWARF 2, and CodeView 8 formats.")
104 (license (license:non-copyleft "file://COPYING"
105 "See COPYING in the distribution."))))
c283b22e
AK
106
107(define-public lightning
108 (package
109 (name "lightning")
5fe56448 110 (version "2.1.2")
c283b22e
AK
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://gnu/lightning/lightning-"
114 version ".tar.gz"))
115 (sha256
116 (base32
5fe56448 117 "0sbs2lm8b9in2m8d52zf0x9gpp40x6r7sl6sha92yq3pr78rwa4v"))))
c283b22e 118 (build-system gnu-build-system)
b6e08049 119 (native-inputs `(("zlib" ,zlib)))
c283b22e
AK
120 (synopsis "Library for generating assembly code at runtime")
121 (description
122 "GNU Lightning is a library that generates assembly language code at
123run-time. Thus, it is useful in creating Just-In-Time compilers. It
124abstracts over the target CPU by exposing a standardized RISC instruction set
125to the clients.")
6fd52309 126 (home-page "https://www.gnu.org/software/lightning/")
da0cef6a 127 (license license:gpl3+)))
9a2e4c5d 128
129(define-public fasm
130 (package
131 (name "fasm")
132 (version "1.73.06")
133 (source
134 (origin
135 (method url-fetch)
136 (uri (string-append "https://flatassembler.net/fasm-"
137 version ".tgz"))
138 (sha256
139 (base32
140 "02wqkqxpn3p0iwcagsm92qd9cdfcnbx8a09qg03b3pjppp30hmp6"))))
141 (build-system gnu-build-system)
142 (arguments
f73b7bf6
DM
143 `(#:tests? #f ; No tests exist
144 #:strip-binaries? #f ; fasm has no sections
9a2e4c5d 145 #:phases
146 (modify-phases %standard-phases
f73b7bf6 147 (delete 'configure) ; no "configure" script exists
9a2e4c5d 148 (replace 'build
149 (lambda _
9a2e4c5d 150 (chdir "source/Linux/")
151 (if (string=? ,(%current-system) "x86_64-linux")
f73b7bf6
DM
152 ;; Use pre-compiled binaries in top-level directory to build
153 ;; fasm.
9a2e4c5d 154 (invoke "../../fasm.x64" "fasm.asm")
155 (invoke "../../fasm" "fasm.asm"))))
156 (replace 'install
157 (lambda _
158 (let ((out (assoc-ref %outputs "out")))
159 (install-file "fasm" (string-append out "/bin")))
160 #t)))))
9a2e4c5d 161 (supported-systems '("x86_64-linux" "i686-linux"))
162 (synopsis "Assembler for x86 processors")
163 (description
cb95e79f
DM
164 "FASM is an assembler that supports x86 and IA-64 Intel architectures.
165It does multiple passes to optimize machine code. It has macro abilities and
166focuses on operating system portability.")
9a2e4c5d 167 (home-page "https://flatassembler.net/")
168 (license license:bsd-2)))
1bde3d2c
DM
169
170(define-public dev86
171 (package
172 (name "dev86")
173 (version "0.16.21")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append "http://v3.sk/~lkundrak/dev86/Dev86src-"
177 version ".tar.gz"))
178 (sha256
179 (base32
180 "154dyr2ph4n0kwi8yx0n78j128kw29rk9r9f7s2gddzrdl712jr3"))))
181 (build-system gnu-build-system)
182 (arguments
183 `(#:parallel-build? #f ; They use submakes wrong
184 #:make-flags (list "CC=gcc"
185 (string-append "PREFIX="
186 (assoc-ref %outputs "out")))
187 #:system "i686-linux" ; Standalone ld86 had problems otherwise
188 #:tests? #f ; No tests exist
189 #:phases
190 (modify-phases %standard-phases
191 (delete 'configure)
192 (add-before 'install 'mkdir
193 (lambda* (#:key outputs #:allow-other-keys)
194 (let ((out (assoc-ref outputs "out")))
195 (mkdir-p (string-append out "/bin"))
196 (mkdir-p (string-append out "/man/man1"))
197 #t))))))
198 (synopsis "Intel 8086 (primarily 16-bit) assembler, C compiler and
199linker")
200 (description "This package provides a Intel 8086 (primarily 16-bit)
201assembler, a C compiler and a linker. The assembler uses Intel syntax
202(also Intel order of operands).")
203 (home-page "https://github.com/jbruchon/dev86")
204 (supported-systems '("i686-linux" "x86_64-linux"))
205 (license license:gpl2+)))