gnu: gedit: Update to 42.2.

* gnu/packages/gnome.scm (gedit): Update to 42.2.
[arguments]: Use gexps.
[parallel-build?]: Tentatively remove argument.
[phases]: Delete trailing #t.
{patch-libgd-fetch}: Rename to...
{do-not-invoke-git}: ... this, removing libgd handling.
{wrap-gedit}: Use 'this-package-input'.
[inputs]: Replace gtksourceview with gtksourceview-4.  Remove amtk,
isco-codes, tepl, libx11 and gnome-desktop.  Add bash-minimal.
Move libxml2 and vala to...
[native-inputs]: ... here.  Remove itstool and libgd.  Add python.
This commit is contained in:
Maxim Cournoyer 2022-09-08 10:48:18 -04:00
parent b90710642e
commit 22aaa843ea
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -7501,7 +7501,7 @@ (define-public gjs
(define-public gedit (define-public gedit
(package (package
(name "gedit") (name "gedit")
(version "40.1") (version "42.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/" (uri (string-append "mirror://gnome/sources/" name "/"
@ -7509,86 +7509,60 @@ (define-public gedit
name "-" version ".tar.xz")) name "-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"149ngl9qw6h59546lir1pa7hvw23ppsnqlj9mfqphmmn5jl99qsm")))) "1jlgzihi4ywvlr4xj2vbnnxzar8j3mwj0jcn8jp6dh0a3w8jjqiw"))))
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:glib-or-gtk? #t (list
#:meson ,meson-0.60 #:glib-or-gtk? #t
#:configure-flags #:configure-flags
;; Otherwise, the RUNPATH will lack the final path component. ;; Otherwise, the RUNPATH will lack the final path component.
(list (string-append "-Dc_link_args=-Wl,-rpath=" #~(list (string-append "-Dc_link_args=-Wl,-rpath="
(assoc-ref %outputs "out") "/lib/gedit")) #$output "/lib/gedit"))
;; XXX: Generated .h files are sometimes used before being built.
#:parallel-build? #f
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'skip-gtk-update-icon-cache (add-after 'unpack 'skip-gtk-update-icon-cache
;; Don't create 'icon-theme.cache'. ;; Don't create 'icon-theme.cache'.
(lambda _ (lambda _
(substitute* "build-aux/meson/post_install.py" (substitute* "build-aux/meson/post_install.py"
(("gtk-update-icon-cache") (which "true"))) (("gtk-update-icon-cache") (which "true")))))
#t)) (add-after 'unpack 'do-not-invoke-git
(add-after 'unpack 'patch-libgd-fetch
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((libgd (assoc-ref inputs "libgd")))
;; Calling git is unnecessary because libgd is fetched as a
;; native input to this package.
(substitute* "meson.build" (substitute* "meson.build"
((".*git.*") "")) ((".*git.*") ""))))
(copy-recursively libgd "subprojects/libgd")
#t)))
(add-after 'install 'wrap-gedit (add-after 'install 'wrap-gedit
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (wrap-program (search-input-file outputs "bin/gedit")
(gtksourceview (assoc-ref inputs "gtksourceview"))
(gi-typelib-path (getenv "GI_TYPELIB_PATH"))
(python-path (getenv "GUIX_PYTHONPATH")))
(wrap-program (string-append out "/bin/gedit")
;; For plugins. ;; For plugins.
`("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))
`("GUIX_PYTHONPATH" ":" prefix (,python-path)) `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
;; For language-specs. ;; For language-specs.
`("XDG_DATA_DIRS" ":" prefix (,(string-append gtksourceview `("XDG_DATA_DIRS" ":" prefix
"/share"))))) (,(string-append #$(this-package-input "gtksourceview")
#t))))) "/share")))))))))
(propagated-inputs (propagated-inputs
(list dconf)) (list dconf))
(native-inputs (native-inputs
`(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database (list desktop-file-utils ;for update-desktop-database
("intltool" ,intltool) `(,glib "bin") ;for glib-mkenums, etc.
("itstool" ,itstool) gobject-introspection
("glib:bin" ,glib "bin") ; for glib-mkenums, etc. intltool
("gobject-introspection" ,gobject-introspection) itstool
("libgd" libxml2
,(origin pkg-config
(method git-fetch) python
(uri (git-reference vala))
(url "https://gitlab.gnome.org/GNOME/libgd")
(commit "c7c7ff4e05d3fe82854219091cf116cce6b19de0")))
(file-name (git-file-name "libgd" version))
(sha256
(base32 "16yld0ap7qj1n96h4f2sqkjmibg7xx5xwkqxdfzam2nmyfdlrrrs"))))
("pkg-config" ,pkg-config)))
(inputs (inputs
(list amtk (list adwaita-icon-theme
bash-minimal
glib glib
gsettings-desktop-schemas
gspell gspell
gtk+ gtk+
gtksourceview gtksourceview-4
libpeas libpeas
libxml2
iso-codes
python-pygobject
python
tepl
gsettings-desktop-schemas
libx11
vala
adwaita-icon-theme
libsoup libsoup
gnome-desktop)) python
python-pygobject))
(home-page "https://wiki.gnome.org/Apps/Gedit") (home-page "https://wiki.gnome.org/Apps/Gedit")
(synopsis "GNOME text editor") (synopsis "GNOME text editor")
(description "While aiming at simplicity and ease of use, gedit is a (description "While aiming at simplicity and ease of use, gedit is a