diff options
Diffstat (limited to 'gnu/packages/smalltalk.scm')
-rw-r--r-- | gnu/packages/smalltalk.scm | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm index 5c5b93236a..168e44cee5 100644 --- a/gnu/packages/smalltalk.scm +++ b/gnu/packages/smalltalk.scm @@ -5,6 +5,8 @@ ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> +;;; Copyright © 2024 Jorge Acereda <jacereda@gmail.com> +;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,23 +30,111 @@ #:use-module (guix utils) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages assembly) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages gl) #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages image) #:use-module (gnu packages libffi) #:use-module (gnu packages libsigsegv) #:use-module (gnu packages linux) #:use-module (gnu packages multiprecision) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages sdl) + #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) +(define-public pharo-vm + (package + (name "pharo-vm") + ;; Use the latest release made available from + ;; <https://files.pharo.org/vm/pharo-spur64-headless/Linux-x86_64/source/>. + (version "10.3.5+19.5c89251") + (source + (origin + (method url-fetch) + ;; These source distributions of Pharo VM include the pre-generated C + ;; source files that are used to bootstrap Pharo. + (uri (string-append "https://files.pharo.org/vm/pharo-spur64-headless/" + "Linux-x86_64/source/PharoVM-v" version + "-Linux-x86_64-c-src.tar.gz")) + (sha256 + (base32 "1w0m25x52p94zfv9gq2v011s0c260m2prpi4zlcrwyi0yxxbz27j")) + (patches (search-patches "pharo-vm-cmake.patch")))) + (build-system cmake-build-system) + (arguments + (list + ;; The test suite requires a pre-built binary image (that it fetches + ;; from the network), along a VM archive that is also requires + ;; downloading online resources to be produced. + #:tests? #f + #:configure-flags + #~(list "-DBUILD_BUNDLE=OFF" + ;; Relax a warning turned error with GCC 14. + "-DCMAKE_C_FLAGS=-Wno-error=incompatible-pointer-types" + ;; The 'GENEERATE_SOURCES=OFF' is to tell the build system to + ;; use the pre-generated C source files, avoiding the need for a + ;; pharo bootstrap binary. + "-DGENERATE_SOURCES=OFF" + "-DGENERATED_SOURCE_DIR=." + ;; This ensures the plugins can be found in RUNPATH. + (string-append "-DPHARO_LIBRARY_PATH=" #$output "/lib") + "-DVERBOSE_BUILD=ON" + "-DVERSION_UPDATE_FROM_GIT=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-ld-library-path + ;; The following libraries are dlopen'd. + (lambda* (#:key inputs #:allow-other-keys) + (wrap-program (string-append #$output "/bin/pharo") + `("LD_LIBRARY_PATH" ":" prefix + + ,(map (lambda (name) + (string-append (assoc-ref inputs name) + "/lib")) + '("cairo" "freetype" "libgit2" "pixman" "sdl2" + "util-linux")))))) + (add-after 'wrap-ld-library-path 'workaround-#1674 + ;; pharo crashes when argv[0] is not an absolute file name. This + ;; can be removed after + ;; <https://codeberg.org/guix/guix/issues/1674> is resolved. + (lambda _ + (substitute* (string-append #$output "/bin/pharo") + (("\\$\\{0##\\*/}") "$0"))))))) + (inputs + (list bash-minimal + cairo + freetype + libffi + libgit2 + libpng + openssl + pixman + sdl2 + `(,util-linux "lib"))) ;for libuuid + (synopsis "Clean and innovative Smalltalk-inspired environment") + (home-page "https://github.com/pharo-project/pharo-vm") + (description + "Pharo aims to provide a clean and innovative Smalltalk-inspired +environment. With a stable and small core system, advanced development tools, +and maintained releases, the Pharo platform can be used to build and deploy +mission critical applications.") + ;; The "spur64" C source bootstrap is only for 64 bit platforms. The + ;; "spur32" variant is no longer maintained. + (supported-systems %64bit-supported-systems) + (license license:expat))) + (define-public smalltalk (package (name "smalltalk") |