smalltalk.scm 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. (define-module (gnu packages smalltalk)
  22. #:use-module ((guix licenses) #:prefix license:)
  23. #:use-module (guix packages)
  24. #:use-module (guix download)
  25. #:use-module (guix build-system cmake)
  26. #:use-module (guix build-system gnu)
  27. #:use-module (gnu packages audio)
  28. #:use-module (gnu packages autotools)
  29. #:use-module (gnu packages base)
  30. #:use-module (gnu packages compression)
  31. #:use-module (gnu packages fontutils)
  32. #:use-module (gnu packages gl)
  33. #:use-module (gnu packages glib)
  34. #:use-module (gnu packages libffi)
  35. #:use-module (gnu packages libsigsegv)
  36. #:use-module (gnu packages linux)
  37. #:use-module (gnu packages pkg-config)
  38. #:use-module (gnu packages pulseaudio)
  39. #:use-module (gnu packages xorg))
  40. (define-public smalltalk
  41. (package
  42. (name "smalltalk")
  43. (version "3.2.5")
  44. (source
  45. (origin
  46. (method url-fetch)
  47. (uri (string-append "mirror://gnu/smalltalk/smalltalk-"
  48. version ".tar.xz"))
  49. (sha256
  50. (base32
  51. "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1"))))
  52. (build-system gnu-build-system)
  53. (native-inputs
  54. `(("libffi" ,libffi)
  55. ("libltdl" ,libltdl)
  56. ("libsigsegv" ,libsigsegv)
  57. ("pkg-config" ,pkg-config)))
  58. (inputs
  59. `(("zip" ,zip)))
  60. (arguments
  61. `(#:phases (alist-cons-before
  62. 'configure 'fix-libc
  63. (lambda _
  64. (let ((libc (assoc-ref %build-inputs "libc")))
  65. (substitute* "libc.la.in"
  66. (("@LIBC_SO_NAME@") "libc.so")
  67. (("@LIBC_SO_DIR@") (string-append libc "/lib")))))
  68. %standard-phases)))
  69. (home-page "http://smalltalk.gnu.org/")
  70. (synopsis "Smalltalk environment")
  71. (description
  72. "GNU Smalltalk is a free implementation of the Smalltalk language. It
  73. implements the ANSI standard for the language and also includes extra classes
  74. such as ones for networking and GUI programming.")
  75. (license license:gpl2+)))
  76. (define-public squeak-vm
  77. (package
  78. (name "squeak-vm")
  79. (version "4.10.2.2614")
  80. (source
  81. (origin
  82. (method url-fetch)
  83. (uri (string-append "http://www.squeakvm.org/unix/release/"
  84. "Squeak-" version "-src.tar.gz"))
  85. (sha256
  86. (base32
  87. "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix"))
  88. (modules '((guix build utils)))
  89. (snippet
  90. ;; Make builds bit-reproducible.
  91. '(begin
  92. (substitute* "unix/cmake/verstamp"
  93. (("vm_date=.*")
  94. "vm_date = \"1970-01-01\";\n")
  95. (("ux_version=.*")
  96. "ux_version = \"GNU\";\n"))
  97. (substitute* "unix/vm/config.cmake"
  98. (("\\(VM_BUILD_STRING.*")
  99. "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")"))))))
  100. (inputs
  101. `(("alsa-lib" ,alsa-lib)
  102. ("dbus" ,dbus)
  103. ("freetype" ,freetype)
  104. ("libffi" ,libffi)
  105. ("libxrender" ,libxrender)
  106. ("mesa" ,mesa)
  107. ("pulseaudio" ,pulseaudio)))
  108. (native-inputs
  109. `(("pkg-config" ,pkg-config)))
  110. (build-system cmake-build-system)
  111. (arguments
  112. `(#:tests? #f ;no check target
  113. #:phases
  114. (modify-phases %standard-phases
  115. (add-after 'unpack 'remove-hardcoded-PATH
  116. (lambda _
  117. ;; Remove hard-coded FHS PATH entries.
  118. (substitute* '("unix/cmake/squeak.in"
  119. "unix/cmake/squeak.sh.in")
  120. (("^PATH=.*") ""))
  121. #t))
  122. (add-after 'unpack 'create-build-dir
  123. (lambda _
  124. (mkdir "bld")
  125. #t))
  126. (replace 'configure
  127. (lambda* (#:key outputs #:allow-other-keys)
  128. (let ((out (assoc-ref outputs "out")))
  129. (with-directory-excursion "bld"
  130. (zero?
  131. (system* "../unix/cmake/configure"
  132. (string-append "--prefix=" out)
  133. "--without-quartz"))))))
  134. (replace 'build
  135. (lambda _
  136. (with-directory-excursion "bld"
  137. (zero? (system* "make"))))))))
  138. (synopsis "Smalltalk programming language and environment")
  139. (description "Squeak is a full-featured implementation of the Smalltalk
  140. programming language and environment based on (and largely compatible with)
  141. the original Smalltalk-80 system. Squeak has very powerful 2- and 3-D
  142. graphics, sound, video, MIDI, animation and other multimedia capabilities. It
  143. also includes a customisable framework for creating dynamic HTTP servers and
  144. interactively extensible Web sites.")
  145. (home-page "http://www.squeakvm.org")
  146. (license license:x11)))