@@ -23,11 +23,13 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
+ #:use-module (gnu packages aspell)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages crates-graphics)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
- #:use-module (gnu packages pkg-config))
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages xorg))
;;;
;;; Please: Try to add new module packages in alphabetic order.
@@ -933,6 +935,68 @@
(description "This package provides raw C-FFI bindings for the gspell library.")
(license license:gpl3+)))
+(define-public rust-gspell-0.4
+ (package
+ (name "rust-gspell")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "gspell" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "10wi6p6dhdqypfqlih18mrl7vgni7y64mrhdh5ymayp4d07djshk"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-gdk" ,rust-gdk-0.12)
+ ("rust-gdk-sys" ,rust-gdk-sys-0.9)
+ ("rust-gio" ,rust-gio-0.8)
+ ("rust-gio-sys" ,rust-gio-sys-0.9)
+ ("rust-glib" ,rust-glib-0.9)
+ ("rust-glib-sys" ,rust-glib-sys-0.9)
+ ("rust-gobject-sys" ,rust-gobject-sys-0.9)
+ ("rust-gspell-sys" ,rust-gspell-sys-0.4)
+ ("rust-gtk" ,rust-gtk-0.8)
+ ("rust-gtk-sys" ,rust-gtk-sys-0.9)
+ ("rust-libc" ,rust-libc-0.2))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Tests require a running X server.
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+
+ ;; For the missing /etc/machine-id.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+
+ ;; Allow Enchant and its Aspell backend to find the en_US
+ ;; dictionary.
+ (setenv "ASPELL_DICT_DIR"
+ (string-append (assoc-ref inputs "aspell-dict-en")
+ "/lib/aspell"))
+ #t)))))
+ (native-inputs
+ `(("aspell-dict-en" ,aspell-dict-en)
+ ("xorg-server" ,xorg-server-for-tests)))
+ (inputs
+ `(("atk" ,atk)
+ ("cairo" ,cairo)
+ ("glib" ,glib)
+ ("gspell" ,(module-ref (resolve-module '(gnu packages gnome))
+ 'gspell))
+ ("gtk+" ,gtk+)
+ ("pango" ,pango)))
+ (home-page
+ "https://gitlab.gnome.org/World/Rust/gspell-rs")
+ (synopsis "Rust bindings for gspell")
+ (description "This package provides Rust bindings for the gspell spell
+checking library.")
+ (license license:gpl3+)))
+
(define-public rust-gtk-0.8
(package
(name "rust-gtk")