virtualbox.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. |
5 | ;;; |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
9 | ;;; your option) any later version. |
10 | ;;; |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | ;;; GNU General Public License for more details. |
15 | ;;; |
16 | ;;; You should have received a copy of the GNU General Public License |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18 | |
19 | (define-module (more packages virtualbox) |
20 | #:use-module ((guix licenses) #:prefix license:) |
21 | #:use-module (guix packages) |
22 | #:use-module (guix download) |
23 | #:use-module (guix svn-download) |
24 | #:use-module (guix build-system gnu) |
25 | #:use-module (gnu packages) |
26 | #:use-module (gnu packages admin) |
27 | #:use-module (gnu packages autotools) |
28 | #:use-module (gnu packages base) |
29 | #:use-module (gnu packages bison) |
30 | #:use-module (more packages cdrom) |
31 | #:use-module (gnu packages curl) |
32 | #:use-module (gnu packages flex) |
33 | #:use-module (gnu packages gl) |
34 | #:use-module (gnu packages gnome) |
35 | #:use-module (gnu packages image) |
36 | #:use-module (gnu packages linux) |
37 | #:use-module (gnu packages m4) |
38 | #:use-module (gnu packages perl) |
39 | #:use-module (gnu packages pkg-config) |
40 | #:use-module (gnu packages python) |
41 | #:use-module (gnu packages qt) |
42 | #:use-module (gnu packages sdl) |
43 | #:use-module (gnu packages texinfo) |
44 | #:use-module (gnu packages tls) |
45 | #:use-module (gnu packages video) |
46 | #:use-module (gnu packages xml) |
47 | #:use-module (gnu packages xorg)) |
48 | |
49 | (define-public kbuild |
50 | (package |
51 | (name "kbuild") |
52 | (version "0.1.9998") |
53 | (source (origin |
54 | ;(method url-fetch) |
55 | ;(uri (string-append "ftp://ftp.netlabs.org/pub/kbuild/kBuild-" |
56 | ; version "-src.tar.gz")) |
57 | ;(sha256 |
58 | ; (base32 |
59 | ; "19j2sswdqqjzjzmg0xam8nmwmxg422iii0fl9cwzcznjfigdn1c2")))) |
60 | (method svn-fetch) |
61 | (uri (svn-reference |
62 | (url "http://svn.netlabs.org/repos/kbuild/trunk") |
63 | (revision 3025))) |
64 | (file-name (string-append name "-" version)) |
65 | (sha256 |
66 | (base32 |
67 | "1k7y2lqqhsfwfzzi7rms7a2kakimm7g46qa2gypkvzdd3drbpanj")))) |
68 | (build-system gnu-build-system) |
69 | (native-inputs |
70 | `(("autoconf" ,autoconf) |
71 | ("automake" ,automake) |
72 | ("bison" ,bison) |
73 | ("flex" ,flex) |
74 | ("perl" ,perl) |
75 | ("texinfo" ,texinfo))) |
76 | (arguments |
77 | `(#:tests? #f |
78 | #:phases |
79 | (modify-phases %standard-phases |
80 | (delete 'configure) |
81 | (add-before 'patch-generated-file-shebangs 'reconfigure |
82 | (lambda _ |
83 | (chdir "src/kmk") |
84 | (system* "autoreconf" "-fiv") |
85 | (chdir "../.."))) |
86 | (add-before 'build 'fix-binaries |
87 | (lambda _ |
88 | (substitute* "Config.kmk" |
89 | (("\\+= rt") "+= rt pthread")) |
90 | (substitute* "src/ash/output.h" |
91 | (("dprintf") "debugprintf")) |
92 | (substitute* "src/ash/output.c" |
93 | (("dprintf") "debugprintf")) |
94 | (substitute* "bootstrap.gmk" |
95 | ((" /bin/sh") (string-append " " (which "sh"))) |
96 | ((" /bin/echo") (string-append " " (which "echo")))) |
97 | (substitute* "kBuild/env.sh" |
98 | (("/bin/pwd") (which "pwd"))))) |
99 | (replace 'build |
100 | (lambda _ |
101 | (zero? (system* "kBuild/env.sh" "--full" "make" "-f" "bootstrap.gmk" |
102 | "AUTORECONF=true" |
103 | (string-append "CONFIG_SHELL=" (which "sh")) |
104 | (string-append "AR=" (which "ar")))))) |
105 | (replace 'install |
106 | (lambda* (#:key outputs #:allow-other-keys) |
107 | (zero? (system* "kBuild/env.sh" "kmk" "PATH_INS=/" |
108 | (string-append "NIX_INSTALL_DIR=" |
109 | (assoc-ref outputs "out"))))))))) |
110 | (home-page "http://trac.netlabs.org/kbuild/wiki") |
111 | (synopsis "Makefile framework") |
112 | (description "kBuild is a makefile framework for writing simple makefiles |
113 | for complex tasks.") |
114 | (license license:gpl3+))) |
115 | |
116 | (define-public acpica-unix |
117 | (package |
118 | (name "acpica-unix") |
119 | (version "20170303") |
120 | (home-page "https://www.acpica.org") |
121 | (source (origin |
122 | (method url-fetch) |
123 | (uri (string-append |
124 | "https://acpica.org/sites/acpica/files/acpica-unix-" |
125 | version ".tar.gz")) |
126 | (sha256 |
127 | (base32 |
128 | "1dc933rr11gv1nlaf5j8ih1chdakbjbjkn34jgbm330zppmck4y0")))) |
129 | (build-system gnu-build-system) |
130 | (native-inputs |
131 | `(("m4" ,m4) |
132 | ("bison" ,bison) |
133 | ("flex" ,flex))) |
134 | (arguments |
135 | `(#:tests? #f; no check target |
136 | #:make-flags |
137 | (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) |
138 | #:phases |
139 | (modify-phases %standard-phases |
140 | (delete 'configure) |
141 | (add-before 'build 'goto-dir |
142 | (lambda _ |
143 | (chdir "generate/unix") |
144 | (zero? (system* "make" "clean"))))))) |
145 | (synopsis "") |
146 | (description "") |
147 | (license license:gpl2+))) |
148 | |
149 | (define-public virtualbox |
150 | (package |
151 | (name "virtualbox") |
152 | (version "5.1.14") |
153 | (source (origin |
154 | (method url-fetch) |
155 | (uri (string-append |
156 | "http://download.virtualbox.org/virtualbox/" version |
157 | "/VirtualBox-" version ".tar.bz2")) |
158 | (file-name (string-append name "-" version ".tar.bz2")) |
159 | (sha256 |
160 | (base32 |
161 | "12i2kyn7svy2kd6j40fzzhy7173xfq884ygb6x9fbihpcw1bnrw2")))) |
162 | (build-system gnu-build-system) |
163 | (native-inputs |
164 | `(;("kbuild" ,kbuild) |
165 | ("pkg-config" ,pkg-config) |
166 | ("which" ,which))) |
167 | (inputs |
168 | `(("acpica" ,acpica); for iasl |
169 | ("alsa" ,alsa-lib) |
170 | ("curl" ,curl) |
171 | ("cdrtools" ,cdrtools) |
172 | ("glu" ,glu) |
173 | ("libidl" ,libidl) |
174 | ("libpng" ,libpng) |
175 | ("libvpx" ,libvpx) |
176 | ("libxcursor" ,libxcursor) |
177 | ("libxext" ,libxext) |
178 | ("libxinerama" ,libxinerama) |
179 | ("libxml2" ,libxml2) |
180 | ("libxmu" ,libxmu) |
181 | ("libxrandr" ,libxrandr) |
182 | ("libxslt" ,libxslt) |
183 | ("lvm2" ,lvm2) |
184 | ("mesa" ,mesa) |
185 | ("python" ,python-2) |
186 | ("qt5" ,qt) |
187 | ("openssl" ,openssl) |
188 | ("sdl" ,sdl))) |
189 | (arguments |
190 | `(#:phases |
191 | (modify-phases %standard-phases |
192 | (add-before 'configure 'fix-paths |
193 | (lambda* (#:key inputs #:allow-other-keys) |
194 | (substitute* "configure" |
195 | (("PYTHONDIR=.*") |
196 | (string-append "PYTHONDIR=" (assoc-ref inputs "python") "\n"))))) |
197 | ;(add-before 'configure 'remove-binaries |
198 | ;(lambda* _ |
199 | ;(substitute* "configure" |
200 | ; (("bin/\\$OS.\\$BUILD_MACHINE") "bin")) |
201 | ;(delete-file-recursively "tools") |
202 | ;(delete-file-recursively "kBuild/bin"))) |
203 | (replace 'configure |
204 | (lambda* (#:key outputs inputs #:allow-other-keys) |
205 | (zero? (system* "./configure" "--disable-java" "--disable-pulse" |
206 | "--disable-vmmraw" |
207 | (string-append "--with-makeself=" (which "echo")))))) |
208 | ;(string-append "--with-kbuild=" |
209 | ; (assoc-ref inputs "kbuild")))))) |
210 | (replace 'build |
211 | (lambda* _ |
212 | (zero? (system* "kmk"))))))) |
213 | (home-page "https://www.virtualbox.org") |
214 | (synopsis "Virtual Machine manager") |
215 | (description |
216 | "VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for |
217 | enterprise as well as home use.") |
218 | (license license:gpl2+))) |
219 |