Commit | Line | Data |
---|---|---|
54845460 NK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> | |
0c9df457 | 3 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
ef380d72 NG |
4 | ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
5 | ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> | |
d9a7fab6 | 6 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
54845460 NK |
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 smalltalk) | |
5b65bcab | 24 | #:use-module ((guix licenses) #:prefix license:) |
54845460 NK |
25 | #:use-module (guix packages) |
26 | #:use-module (guix download) | |
ef380d72 | 27 | #:use-module (guix build-system cmake) |
54845460 | 28 | #:use-module (guix build-system gnu) |
e3281657 MÁAV |
29 | #:use-module (gnu packages) |
30 | #:use-module (gnu packages assembly) | |
ef380d72 | 31 | #:use-module (gnu packages audio) |
0c9df457 | 32 | #:use-module (gnu packages autotools) |
ef380d72 | 33 | #:use-module (gnu packages base) |
148585c2 | 34 | #:use-module (gnu packages compression) |
ef380d72 NG |
35 | #:use-module (gnu packages fontutils) |
36 | #:use-module (gnu packages gl) | |
37 | #:use-module (gnu packages glib) | |
0c9df457 EF |
38 | #:use-module (gnu packages libffi) |
39 | #:use-module (gnu packages libsigsegv) | |
ef380d72 | 40 | #:use-module (gnu packages linux) |
e3281657 | 41 | #:use-module (gnu packages multiprecision) |
0c9df457 | 42 | #:use-module (gnu packages pkg-config) |
ef380d72 | 43 | #:use-module (gnu packages pulseaudio) |
148585c2 | 44 | #:use-module (gnu packages xorg)) |
54845460 NK |
45 | |
46 | (define-public smalltalk | |
47 | (package | |
48 | (name "smalltalk") | |
df965a54 | 49 | (version "3.2.91") |
54845460 NK |
50 | (source |
51 | (origin | |
52 | (method url-fetch) | |
df965a54 MÁAV |
53 | ;; XXX: Revert to mirror://gnu with the next release of Smalltalk. |
54 | (uri (string-append "https://alpha.gnu.org/gnu/smalltalk/smalltalk-" | |
54845460 NK |
55 | version ".tar.xz")) |
56 | (sha256 | |
57 | (base32 | |
df965a54 | 58 | "1zb2h5cbz1cwybqjl24lflw359lwj7sjvvhwb4x6miypzhwq4qh0")) |
e3281657 MÁAV |
59 | ;; XXX: To be removed with the next release of Smalltalk. |
60 | (patches (search-patches "smalltalk-multiplication-overflow.patch")))) | |
54845460 | 61 | (build-system gnu-build-system) |
0c9df457 | 62 | (native-inputs |
e3281657 MÁAV |
63 | `(("pkg-config" ,pkg-config) |
64 | ;; XXX: To be removed with the next release of Smalltalk. | |
65 | ("autoconf" ,autoconf) | |
66 | ("automake" ,automake) | |
67 | ("libtool" ,libtool))) | |
68 | ;; TODO: These optional dependencies raise the closure size to ~1 GiB | |
69 | ;; from the current ~100 MiB, although some of them might be very | |
70 | ;; useful for end users: | |
71 | ;; - freeglut | |
72 | ;; - glib | |
73 | ;; - gobject-introspection | |
74 | ;; - gtk+-2 | |
75 | ;; - tcl/tk | |
76 | ;; - SDL (sdl-union) | |
77 | ;; - sqlite | |
78 | ;; - zlib | |
79 | (inputs | |
80 | `(("gmp" ,gmp) | |
81 | ("libffi" ,libffi) | |
0c9df457 EF |
82 | ("libltdl" ,libltdl) |
83 | ("libsigsegv" ,libsigsegv) | |
e3281657 MÁAV |
84 | ("lightning" ,lightning) |
85 | ("zip" ,zip))) | |
54845460 | 86 | (arguments |
dc1d3cde KK |
87 | `(#:phases |
88 | (modify-phases %standard-phases | |
e3281657 MÁAV |
89 | ;; XXX: To be removed with the next release of Smalltalk. |
90 | ;; The overflow patch modifies configure.ac, therefore remove | |
91 | ;; old configure script and enforce an autoreconf. | |
92 | (add-before 'bootstrap 'remove-unpatched-configure | |
93 | (lambda _ | |
94 | (delete-file "configure") | |
95 | #t)) | |
96 | ;; XXX: To be removed with the next release of Smalltalk. | |
97 | ;; We don't want to regenerate the info files. | |
98 | (add-after 'build 'keep-generated-info-manual | |
99 | (lambda _ | |
100 | (for-each (lambda (file) | |
101 | (invoke "touch" file)) | |
102 | (find-files "doc" "\\.info")) | |
103 | #t)) | |
dc1d3cde KK |
104 | (add-before 'configure 'fix-libc |
105 | (lambda _ | |
106 | (let ((libc (assoc-ref %build-inputs "libc"))) | |
107 | (substitute* "libc.la.in" | |
108 | (("@LIBC_SO_NAME@") "libc.so") | |
109 | (("@LIBC_SO_DIR@") (string-append libc "/lib")))) | |
110 | #t))))) | |
0c9df457 | 111 | (home-page "http://smalltalk.gnu.org/") |
f50d2669 | 112 | (synopsis "Smalltalk environment") |
54845460 | 113 | (description |
a22dc0c4 LC |
114 | "GNU Smalltalk is a free implementation of the Smalltalk language. It |
115 | implements the ANSI standard for the language and also includes extra classes | |
116 | such as ones for networking and GUI programming.") | |
5b65bcab | 117 | (license license:gpl2+))) |
ef380d72 NG |
118 | |
119 | (define-public squeak-vm | |
120 | (package | |
121 | (name "squeak-vm") | |
122 | (version "4.10.2.2614") | |
123 | (source | |
124 | (origin | |
125 | (method url-fetch) | |
b3c1dac1 | 126 | (uri (string-append "http://squeakvm.org/unix/release/" |
ef380d72 NG |
127 | "Squeak-" version "-src.tar.gz")) |
128 | (sha256 | |
b3c1dac1 | 129 | (base32 "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix")) |
4af1876e LC |
130 | (modules '((guix build utils))) |
131 | (snippet | |
132 | ;; Make builds bit-reproducible. | |
133 | '(begin | |
134 | (substitute* "unix/cmake/verstamp" | |
135 | (("vm_date=.*") | |
136 | "vm_date = \"1970-01-01\";\n") | |
137 | (("ux_version=.*") | |
138 | "ux_version = \"GNU\";\n")) | |
139 | (substitute* "unix/vm/config.cmake" | |
140 | (("\\(VM_BUILD_STRING.*") | |
6cbee49d MW |
141 | "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")")) |
142 | #t)))) | |
ef380d72 NG |
143 | (inputs |
144 | `(("alsa-lib" ,alsa-lib) | |
145 | ("dbus" ,dbus) | |
146 | ("freetype" ,freetype) | |
147 | ("libffi" ,libffi) | |
148 | ("libxrender" ,libxrender) | |
149 | ("mesa" ,mesa) | |
150 | ("pulseaudio" ,pulseaudio))) | |
151 | (native-inputs | |
152 | `(("pkg-config" ,pkg-config))) | |
153 | (build-system cmake-build-system) | |
154 | (arguments | |
155 | `(#:tests? #f ;no check target | |
156 | #:phases | |
157 | (modify-phases %standard-phases | |
158 | (add-after 'unpack 'remove-hardcoded-PATH | |
159 | (lambda _ | |
160 | ;; Remove hard-coded FHS PATH entries. | |
161 | (substitute* '("unix/cmake/squeak.in" | |
162 | "unix/cmake/squeak.sh.in") | |
163 | (("^PATH=.*") "")) | |
164 | #t)) | |
30d6eb85 | 165 | (add-before 'configure 'enter-build-directory |
ef380d72 | 166 | (lambda _ |
30d6eb85 TGR |
167 | (mkdir "build") |
168 | (chdir "build") | |
ef380d72 NG |
169 | #t)) |
170 | (replace 'configure | |
171 | (lambda* (#:key outputs #:allow-other-keys) | |
172 | (let ((out (assoc-ref outputs "out"))) | |
30d6eb85 TGR |
173 | (invoke "../unix/cmake/configure" |
174 | (string-append "--prefix=" out) | |
175 | "--without-quartz") | |
176 | #t)))))) | |
ef380d72 NG |
177 | (synopsis "Smalltalk programming language and environment") |
178 | (description "Squeak is a full-featured implementation of the Smalltalk | |
179 | programming language and environment based on (and largely compatible with) | |
180 | the original Smalltalk-80 system. Squeak has very powerful 2- and 3-D | |
181 | graphics, sound, video, MIDI, animation and other multimedia capabilities. It | |
182 | also includes a customisable framework for creating dynamic HTTP servers and | |
183 | interactively extensible Web sites.") | |
b3c1dac1 | 184 | (home-page "http://squeakvm.org/") |
ef380d72 | 185 | (license license:x11))) |