gnu: Add amule.
[jackhill/guix/guix.git] / gnu / packages / smalltalk.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages smalltalk)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system cmake)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages audio)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages fontutils)
33 #:use-module (gnu packages gl)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages libffi)
36 #:use-module (gnu packages libsigsegv)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages pulseaudio)
40 #:use-module (gnu packages xorg))
41
42 (define-public smalltalk
43 (package
44 (name "smalltalk")
45 (version "3.2.5")
46 (source
47 (origin
48 (method url-fetch)
49 (uri (string-append "mirror://gnu/smalltalk/smalltalk-"
50 version ".tar.xz"))
51 (sha256
52 (base32
53 "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1"))))
54 (build-system gnu-build-system)
55 (native-inputs
56 `(("libffi" ,libffi)
57 ("libltdl" ,libltdl)
58 ("libsigsegv" ,libsigsegv)
59 ("pkg-config" ,pkg-config)))
60 (inputs
61 `(("zip" ,zip)))
62 (arguments
63 `(#:phases
64 (modify-phases %standard-phases
65 (add-before 'configure 'fix-libc
66 (lambda _
67 (let ((libc (assoc-ref %build-inputs "libc")))
68 (substitute* "libc.la.in"
69 (("@LIBC_SO_NAME@") "libc.so")
70 (("@LIBC_SO_DIR@") (string-append libc "/lib"))))
71 #t)))))
72 (home-page "http://smalltalk.gnu.org/")
73 (synopsis "Smalltalk environment")
74 (description
75 "GNU Smalltalk is a free implementation of the Smalltalk language. It
76 implements the ANSI standard for the language and also includes extra classes
77 such as ones for networking and GUI programming.")
78 (license license:gpl2+)))
79
80 (define-public squeak-vm
81 (package
82 (name "squeak-vm")
83 (version "4.10.2.2614")
84 (source
85 (origin
86 (method url-fetch)
87 (uri (string-append "http://www.squeakvm.org/unix/release/"
88 "Squeak-" version "-src.tar.gz"))
89 (sha256
90 (base32
91 "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix"))
92 (modules '((guix build utils)))
93 (snippet
94 ;; Make builds bit-reproducible.
95 '(begin
96 (substitute* "unix/cmake/verstamp"
97 (("vm_date=.*")
98 "vm_date = \"1970-01-01\";\n")
99 (("ux_version=.*")
100 "ux_version = \"GNU\";\n"))
101 (substitute* "unix/vm/config.cmake"
102 (("\\(VM_BUILD_STRING.*")
103 "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")"))))))
104 (inputs
105 `(("alsa-lib" ,alsa-lib)
106 ("dbus" ,dbus)
107 ("freetype" ,freetype)
108 ("libffi" ,libffi)
109 ("libxrender" ,libxrender)
110 ("mesa" ,mesa)
111 ("pulseaudio" ,pulseaudio)))
112 (native-inputs
113 `(("pkg-config" ,pkg-config)))
114 (build-system cmake-build-system)
115 (arguments
116 `(#:tests? #f ;no check target
117 #:phases
118 (modify-phases %standard-phases
119 (add-after 'unpack 'remove-hardcoded-PATH
120 (lambda _
121 ;; Remove hard-coded FHS PATH entries.
122 (substitute* '("unix/cmake/squeak.in"
123 "unix/cmake/squeak.sh.in")
124 (("^PATH=.*") ""))
125 #t))
126 (add-after 'unpack 'create-build-dir
127 (lambda _
128 (mkdir "bld")
129 #t))
130 (replace 'configure
131 (lambda* (#:key outputs #:allow-other-keys)
132 (let ((out (assoc-ref outputs "out")))
133 (with-directory-excursion "bld"
134 (zero?
135 (system* "../unix/cmake/configure"
136 (string-append "--prefix=" out)
137 "--without-quartz"))))))
138 (replace 'build
139 (lambda _
140 (with-directory-excursion "bld"
141 (zero? (system* "make"))))))))
142 (synopsis "Smalltalk programming language and environment")
143 (description "Squeak is a full-featured implementation of the Smalltalk
144 programming language and environment based on (and largely compatible with)
145 the original Smalltalk-80 system. Squeak has very powerful 2- and 3-D
146 graphics, sound, video, MIDI, animation and other multimedia capabilities. It
147 also includes a customisable framework for creating dynamic HTTP servers and
148 interactively extensible Web sites.")
149 (home-page "http://www.squeakvm.org")
150 (license license:x11)))