gnu: Add python-black.
[jackhill/guix/guix.git] / gnu / packages / assembly.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
3 ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages assembly)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix download)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages texinfo)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages xml))
34
35 (define-public nasm
36 (package
37 (name "nasm")
38 (version "2.13.03")
39 (source (origin
40 (method url-fetch)
41 (uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
42 version "/" name "-" version ".tar.xz"))
43 (sha256
44 (base32
45 "0wr58pb2wnyihcl6635hlx98fnscx5yirxm8m84x8nxwvjqcybl1"))))
46 (build-system gnu-build-system)
47 (native-inputs `(("perl" ,perl) ;for doc and test target
48 ("texinfo" ,texinfo)))
49 (arguments
50 `(#:test-target "test"
51 #:phases
52 (modify-phases %standard-phases
53 (add-after 'unpack 'dont-build-ps-pdf-outputs
54 (lambda _
55 (substitute* "doc/Makefile.in"
56 (("html nasmdoc.txt nasmdoc.pdf")
57 "html nasmdoc.txt")
58 (("\\$\\(INSTALL_DATA\\) nasmdoc.pdf")
59 "$(INSTALL_DATA)"))
60 #t))
61 (add-after 'install 'install-info
62 (lambda _
63 (invoke "make" "install_doc"))))))
64 (home-page "http://www.nasm.us/")
65 (synopsis "80x86 and x86-64 assembler")
66 (description
67 "NASM, the Netwide Assembler, is an 80x86 and x86-64 assembler designed
68 for portability and modularity. It supports a range of object file formats,
69 including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ,
70 Windows32 and Windows64. It will also output plain binary files. Its syntax
71 is designed to be simple and easy to understand, similar to Intel's but less
72 complex. It supports all currently known x86 architectural extensions, and
73 has strong support for macros.")
74 (license license:bsd-3)))
75
76 (define-public yasm
77 (package
78 (name "yasm")
79 (version "1.3.0")
80 (source (origin
81 (method url-fetch)
82 (uri (string-append
83 "http://www.tortall.net/projects/yasm/releases/yasm-"
84 version ".tar.gz"))
85 (sha256
86 (base32
87 "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix"))))
88 (build-system gnu-build-system)
89 (inputs
90 `(("python" ,python-wrapper)
91 ("xmlto" ,xmlto)))
92 (home-page "http://yasm.tortall.net/")
93 (synopsis "Rewrite of the NASM assembler")
94 (description
95 "Yasm is a complete rewrite of the NASM assembler.
96
97 Yasm currently supports the x86 and AMD64 instruction sets, accepts NASM
98 and GAS assembler syntaxes, outputs binary, ELF32, ELF64, 32 and 64-bit
99 Mach-O, RDOFF2, COFF, Win32, and Win64 object formats, and generates source
100 debugging information in STABS, DWARF 2, and CodeView 8 formats.")
101 (license (license:non-copyleft "file://COPYING"
102 "See COPYING in the distribution."))))
103
104 (define-public lightning
105 (package
106 (name "lightning")
107 (version "2.1.2")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://gnu/lightning/lightning-"
111 version ".tar.gz"))
112 (sha256
113 (base32
114 "0sbs2lm8b9in2m8d52zf0x9gpp40x6r7sl6sha92yq3pr78rwa4v"))))
115 (build-system gnu-build-system)
116 (native-inputs `(("zlib" ,zlib)))
117 (synopsis "Library for generating assembly code at runtime")
118 (description
119 "GNU Lightning is a library that generates assembly language code at
120 run-time. Thus, it is useful in creating Just-In-Time compilers. It
121 abstracts over the target CPU by exposing a standardized RISC instruction set
122 to the clients.")
123 (home-page "https://www.gnu.org/software/lightning/")
124 (license license:gpl3+)))