| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 |
|
| 26 | (define-module (gnu packages smalltalk)
|
| 27 | #:use-module ((guix licenses) #:prefix license:)
|
| 28 | #:use-module (guix packages)
|
| 29 | #:use-module (guix download)
|
| 30 | #:use-module (guix utils)
|
| 31 | #:use-module (guix build-system cmake)
|
| 32 | #:use-module (guix build-system gnu)
|
| 33 | #:use-module (guix gexp)
|
| 34 | #:use-module (gnu packages)
|
| 35 | #:use-module (gnu packages assembly)
|
| 36 | #:use-module (gnu packages audio)
|
| 37 | #:use-module (gnu packages autotools)
|
| 38 | #:use-module (gnu packages base)
|
| 39 | #:use-module (gnu packages bash)
|
| 40 | #:use-module (gnu packages compression)
|
| 41 | #:use-module (gnu packages fontutils)
|
| 42 | #:use-module (gnu packages gl)
|
| 43 | #:use-module (gnu packages glib)
|
| 44 | #:use-module (gnu packages gtk)
|
| 45 | #:use-module (gnu packages image)
|
| 46 | #:use-module (gnu packages libffi)
|
| 47 | #:use-module (gnu packages libsigsegv)
|
| 48 | #:use-module (gnu packages linux)
|
| 49 | #:use-module (gnu packages multiprecision)
|
| 50 | #:use-module (gnu packages pkg-config)
|
| 51 | #:use-module (gnu packages pulseaudio)
|
| 52 | #:use-module (gnu packages sdl)
|
| 53 | #:use-module (gnu packages tls)
|
| 54 | #:use-module (gnu packages version-control)
|
| 55 | #:use-module (gnu packages xdisorg)
|
| 56 | #:use-module (gnu packages xorg))
|
| 57 |
|
| 58 | (define-public pharo-vm
|
| 59 | (package
|
| 60 | (name "pharo-vm")
|
| 61 | |
| 62 | |
| 63 | (version "10.3.7+3.af67084")
|
| 64 | (source
|
| 65 | (origin
|
| 66 | (method url-fetch)
|
| 67 | |
| 68 | |
| 69 | (uri (string-append "https://files.pharo.org/vm/pharo-spur64-headless/"
|
| 70 | "Linux-x86_64/source/PharoVM-v" version
|
| 71 | "-Linux-x86_64-c-src.tar.gz"))
|
| 72 | (sha256
|
| 73 | (base32 "0h4qqrxgw7kv4al8k6dr6xai6gwrc25vgsamj6czqrvnskfln8fh"))
|
| 74 | (patches (search-patches "pharo-vm-cmake.patch"))))
|
| 75 | (build-system cmake-build-system)
|
| 76 | (arguments
|
| 77 | (list
|
| 78 | |
| 79 | |
| 80 | |
| 81 | #:tests? #f
|
| 82 | #:configure-flags
|
| 83 | #~(list "-DBUILD_BUNDLE=OFF"
|
| 84 | |
| 85 | "-DCMAKE_C_FLAGS=-Wno-error=incompatible-pointer-types"
|
| 86 | |
| 87 | |
| 88 | |
| 89 | "-DGENERATE_SOURCES=OFF"
|
| 90 | "-DGENERATED_SOURCE_DIR=."
|
| 91 | |
| 92 | (string-append "-DPHARO_LIBRARY_PATH=" #$output "/lib")
|
| 93 | "-DVERBOSE_BUILD=ON"
|
| 94 | "-DVERSION_UPDATE_FROM_GIT=OFF")
|
| 95 | #:phases
|
| 96 | #~(modify-phases %standard-phases
|
| 97 | (add-after 'unpack 'make-reproducible
|
| 98 | (lambda _
|
| 99 | (substitute* "include/pharovm/config.h.in"
|
| 100 | |
| 101 | |
| 102 | |
| 103 | (("\\$\\{CMAKE_SYSTEM}")
|
| 104 | "${CMAKE_SYSTEM_NAME}"))))
|
| 105 | (add-after 'install 'wrap-ld-library-path
|
| 106 | |
| 107 | (lambda* (#:key inputs #:allow-other-keys)
|
| 108 | (wrap-program (string-append #$output "/bin/pharo")
|
| 109 | `("LD_LIBRARY_PATH" ":" prefix
|
| 110 |
|
| 111 | ,(map (lambda (name)
|
| 112 | (string-append (assoc-ref inputs name)
|
| 113 | "/lib"))
|
| 114 | '("cairo" "freetype" "libgit2" "pixman" "sdl2"
|
| 115 | "util-linux"))))))
|
| 116 | (add-after 'wrap-ld-library-path 'workaround-#1674
|
| 117 | |
| 118 | |
| 119 | |
| 120 | (lambda _
|
| 121 | (substitute* (string-append #$output "/bin/pharo")
|
| 122 | (("\\$\\{0##\\*/}") "$0")))))))
|
| 123 | (inputs
|
| 124 | (list bash-minimal
|
| 125 | cairo
|
| 126 | freetype
|
| 127 | libffi
|
| 128 | libgit2
|
| 129 | libpng
|
| 130 | openssl
|
| 131 | pixman
|
| 132 | sdl2
|
| 133 | `(,util-linux "lib"))) |
| 134 | (synopsis "Clean and innovative Smalltalk-inspired environment")
|
| 135 | (home-page "https://github.com/pharo-project/pharo-vm")
|
| 136 | (description
|
| 137 | "Pharo aims to provide a clean and innovative Smalltalk-inspired
|
| 138 | environment. With a stable and small core system, advanced development tools,
|
| 139 | and maintained releases, the Pharo platform can be used to build and deploy
|
| 140 | mission critical applications.")
|
| 141 | |
| 142 | |
| 143 | (supported-systems %64bit-supported-systems)
|
| 144 | (license license:expat)))
|
| 145 |
|
| 146 | (define-public smalltalk
|
| 147 | (package
|
| 148 | (name "smalltalk")
|
| 149 | (version "3.2.91")
|
| 150 | (source
|
| 151 | (origin
|
| 152 | (method url-fetch)
|
| 153 | |
| 154 | (uri (string-append "https://alpha.gnu.org/gnu/smalltalk/smalltalk-"
|
| 155 | version ".tar.xz"))
|
| 156 | (sha256
|
| 157 | (base32
|
| 158 | "1zb2h5cbz1cwybqjl24lflw359lwj7sjvvhwb4x6miypzhwq4qh0"))
|
| 159 | |
| 160 | (patches (search-patches "smalltalk-multiplication-overflow.patch"))))
|
| 161 | (build-system gnu-build-system)
|
| 162 | (native-inputs
|
| 163 | (list pkg-config
|
| 164 | (libc-utf8-locales-for-target)
|
| 165 | |
| 166 | autoconf
|
| 167 | automake
|
| 168 | libtool
|
| 169 | zip))
|
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | (inputs
|
| 182 | (list gmp libffi libltdl libsigsegv lightning))
|
| 183 | (arguments
|
| 184 | `(#:make-flags '("CFLAGS=-Wno-incompatible-pointer-types")
|
| 185 | |
| 186 | |
| 187 | #:tests? ,(not (target-x86-64?))
|
| 188 | #:phases
|
| 189 | (modify-phases %standard-phases
|
| 190 | |
| 191 | |
| 192 | |
| 193 | (add-before 'bootstrap 'remove-unpatched-configure
|
| 194 | (lambda _
|
| 195 | (delete-file "configure")
|
| 196 | #t))
|
| 197 | |
| 198 | |
| 199 | (add-after 'build 'keep-generated-info-manual
|
| 200 | (lambda _
|
| 201 | (for-each (lambda (file)
|
| 202 | (invoke "touch" file))
|
| 203 | (find-files "doc" "\\.info"))
|
| 204 | #t))
|
| 205 | (add-before 'configure 'fix-libc
|
| 206 | (lambda* (#:key inputs #:allow-other-keys)
|
| 207 | (let ((libc (or (assoc-ref inputs "libc")
|
| 208 | |
| 209 | |
| 210 | |
| 211 | (assoc-ref inputs "cross-libc"))))
|
| 212 | (substitute* "libc.la.in"
|
| 213 | (("@LIBC_SO_NAME@") "libc.so")
|
| 214 | (("@LIBC_SO_DIR@") (string-append libc "/lib"))))
|
| 215 | #t)))))
|
| 216 | (home-page "https://smalltalk.gnu.org/")
|
| 217 | (synopsis "Programming language environment")
|
| 218 | (description
|
| 219 | "GNU Smalltalk is a free implementation of the Smalltalk language. It
|
| 220 | implements the ANSI standard for the language and also includes extra classes
|
| 221 | such as ones for networking and GUI programming.")
|
| 222 | (license license:gpl2+)))
|
| 223 |
|
| 224 | (define-public squeak-vm
|
| 225 | (package
|
| 226 | (name "squeak-vm")
|
| 227 | (version "4.10.2.2614")
|
| 228 | (source
|
| 229 | (origin
|
| 230 | (method url-fetch)
|
| 231 | (uri (string-append "http://squeakvm.org/unix/release/"
|
| 232 | "Squeak-" version "-src-no-mp3.tar.gz"))
|
| 233 | (sha256
|
| 234 | (base32 "01miyjpka9x24xsp4j54mm9zjiaci670sss50qvd94y5q2iq9cx7"))
|
| 235 | (modules '((guix build utils)))
|
| 236 | (snippet
|
| 237 | |
| 238 | '(begin
|
| 239 | (substitute* "unix/cmake/verstamp"
|
| 240 | (("vm_date=.*")
|
| 241 | "vm_date = \"1970-01-01\";\n")
|
| 242 | (("ux_version=.*")
|
| 243 | "ux_version = \"GNU\";\n"))
|
| 244 | (substitute* "unix/vm/config.cmake"
|
| 245 | (("\\(VM_BUILD_STRING.*")
|
| 246 | "(VM_BUILD_STRING \\\"Built with GNU Guix\\\")"))))
|
| 247 | (patches (search-patches "squeak-vm-gcc-14-fix.patch"))))
|
| 248 | (build-system cmake-build-system)
|
| 249 | (arguments
|
| 250 | (list #:tests? #f |
| 251 | #:configure-flags
|
| 252 | #~(list (string-append "-DVM_HOST=" #$(nix-system->gnu-triplet
|
| 253 | (or (%current-target-system)
|
| 254 | (%current-system))))
|
| 255 | (string-append "-DVM_VERSION=" #$version)
|
| 256 | "-DCMAKE_VERBOSE_MAKEFILE=ON")
|
| 257 | #:phases
|
| 258 | #~(modify-phases %standard-phases
|
| 259 | (add-after 'unpack 'chdir
|
| 260 | (lambda _
|
| 261 | (chdir "unix")))
|
| 262 | (add-after 'chdir 'remove-hardcoded-PATH
|
| 263 | (lambda _
|
| 264 | |
| 265 | (substitute* '("cmake/squeak.in"
|
| 266 | "cmake/squeak.sh.in")
|
| 267 | (("^PATH=.*") "")))))))
|
| 268 | (native-inputs (list pkg-config))
|
| 269 | (inputs
|
| 270 | (list alsa-lib
|
| 271 | dbus
|
| 272 | freetype
|
| 273 | libffi
|
| 274 | libxrender
|
| 275 | mesa
|
| 276 | pulseaudio))
|
| 277 | (synopsis "Smalltalk programming language and environment")
|
| 278 | (description "Squeak is a full-featured implementation of the Smalltalk
|
| 279 | programming language and environment based on (and largely compatible with)
|
| 280 | the original Smalltalk-80 system. Squeak has very powerful 2- and 3-D
|
| 281 | graphics, sound, video, MIDI, animation and other multimedia capabilities. It
|
| 282 | also includes a customisable framework for creating dynamic HTTP servers and
|
| 283 | interactively extensible Web sites.")
|
| 284 | (home-page "http://squeakvm.org/")
|
| 285 | (license license:x11)))
|