Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / build-tools.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages build-tools)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix utils)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages python)
28 #:use-module (gnu packages ninja)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python))
31
32 (define-public bam
33 (package
34 (name "bam")
35 (version "0.4.0")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append "http://github.com/downloads/matricks/"
39 "bam/bam-" version ".tar.bz2"))
40 (sha256
41 (base32
42 "0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn"))))
43 (build-system gnu-build-system)
44 (arguments
45 `(#:phases
46 (modify-phases %standard-phases
47 (delete 'configure)
48 (replace 'build
49 (lambda _
50 (zero? (system* "bash" "make_unix.sh"))))
51 (replace 'check
52 (lambda _
53 (zero? (system* "python" "scripts/test.py"))))
54 (replace 'install
55 (lambda* (#:key outputs #:allow-other-keys)
56 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
57 (mkdir-p bin)
58 (install-file "bam" bin)
59 #t))))))
60 (native-inputs
61 `(("python" ,python-2)))
62 (home-page "https://matricks.github.io/bam/")
63 (synopsis "Fast and flexible build system")
64 (description "Bam is a fast and flexible build system. Bam uses Lua to
65 describe the build process. It takes its inspiration for the script files
66 from scons. While scons focuses on being 100% correct when building, bam
67 makes a few sacrifices to acquire fast full and incremental build times.")
68 (license license:bsd-3)))
69
70 (define-public meson
71 (package
72 (name "meson")
73 (version "0.41.1")
74 (source (origin
75 (method url-fetch)
76 (uri (string-append "https://github.com/mesonbuild/meson/"
77 "archive/" version ".tar.gz"))
78 (file-name (string-append name "-" version ".tar.gz"))
79 (sha256
80 (base32
81 "12ygjh1dxi8z06nl704rfb6zj0m2zjqp279nymfgzfgy5zq032d4"))))
82 (build-system python-build-system)
83 (inputs `(("ninja", ninja)))
84 (home-page "https://mesonbuild.com/")
85 (synopsis "Build system designed to be fast and user-friendly")
86 (description
87 "The Meson build system is focused on user-friendliness and speed.
88 It can compile code written in C, C++, Fortran, Java, Rust, and other
89 languages. Meson provides features comparable to those of the
90 Autoconf/Automake/make combo. Build specifications, also known as @dfn{Meson
91 files}, are written in a custom domain-specific language (DSL) that resembles
92 Python.")
93 (license license:asl2.0)))
94
95 (define-public premake4
96 (package
97 (name "premake")
98 (version "4.3")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "mirror://sourceforge/premake/Premake/"
102 version "/premake-" version "-src.zip"))
103 (sha256
104 (base32
105 "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn"))))
106 (build-system gnu-build-system)
107 (native-inputs
108 `(("unzip" ,unzip))) ; for unpacking the source
109 (arguments
110 `(#:make-flags '("CC=gcc")
111 #:tests? #f ; No test suite
112 #:phases
113 (modify-phases %standard-phases
114 (delete 'configure)
115 (add-after 'unpack 'enter-source
116 (lambda _ (chdir "build/gmake.unix") #t))
117 (replace 'install
118 (lambda* (#:key outputs #:allow-other-keys)
119 (install-file "../../bin/release/premake4"
120 (string-append (assoc-ref outputs "out") "/bin"))
121 #t)))))
122 (synopsis "Portable software build tool")
123 (description "@code{premake4} is a command line utility that reads a
124 scripted definition of a software project and outputs @file{Makefile}s or
125 other lower-level build files.")
126 (home-page "https://premake.github.io")
127 (license license:bsd-3)))