gnu: gitg: Use new package style.

* gnu/packages/gnome.scm (gitg)[arguments]: Use G-expressions.
[native-inputs]: Drop labels.
This commit is contained in:
Liliana Marie Prikler 2022-03-06 14:18:47 +01:00
parent 62479e9420
commit 716265fd69
No known key found for this signature in database
GPG Key ID: 442A84B8C70E2F87

View File

@ -11353,41 +11353,38 @@ higher level porcelain stuff.")
"0npg4kqpwl992fgjd2cn3fh84aiwpdp9kd8z7rw2xaj2iazsm914")))) "0npg4kqpwl992fgjd2cn3fh84aiwpdp9kd8z7rw2xaj2iazsm914"))))
(build-system meson-build-system) (build-system meson-build-system)
(arguments (arguments
`(#:glib-or-gtk? #t (list
#:phases #:glib-or-gtk? #t
(modify-phases %standard-phases #:phases
(add-after 'unpack 'disable-post-install-partially #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'disable-post-install-partially
(substitute* "meson_post_install.py" (lambda _
(("'python'") ; there are no python sources to compile (substitute* "meson_post_install.py"
(string-append "'" (which "true") "'")) (("'python'") ; there are no python sources to compile
(("gtk-update-icon-cache") (which "true"))) (string-append "'" (which "true") "'"))
#t)) (("gtk-update-icon-cache") (which "true")))))
(add-after 'unpack 'fix-test-sources (add-after 'unpack 'fix-test-sources
(lambda _ (lambda _
(substitute* "tests/libgitg/test-commit.vala" (substitute* "tests/libgitg/test-commit.vala"
(("/bin/bash") (which "bash"))) (("/bin/bash") (which "bash")))))
#t)) ;; XXX: Remove upon next version bump
;; XXX: Remove upon next version bump (add-after 'unpack 'harden
(add-after 'unpack 'harden (lambda _
(lambda _ ;; See <https://gitlab.gnome.org/GNOME/gitg/-/issues/337>
;; See <https://gitlab.gnome.org/GNOME/gitg/-/issues/337> (substitute* "libgitg/gitg-date.vala"
(substitute* "libgitg/gitg-date.vala" (("(val\|tzs) == null" all val)
(("(val\|tzs) == null" all val) (string-append val " == null || " val " == \"\""))
(string-append val " == null || " val " == \"\"")) (("(val\|tzs) != null" all val)
(("(val\|tzs) != null" all val) (string-append val " != null && " val " != \"\"")))
(string-append val " != null && " val " != \"\""))) ;; See <https://gitlab.gnome.org/GNOME/gitg/-/merge_requests/159>
;; See <https://gitlab.gnome.org/GNOME/gitg/-/merge_requests/159> (substitute* "gitg/gitg-action-support.vala"
(substitute* "gitg/gitg-action-support.vala" (("stash_if_needed\\((.*), Gitg.Ref head" all other)
(("stash_if_needed\\((.*), Gitg.Ref head" all other) (string-append "stash_if_needed(" other ", Gitg.Ref? head")))))
(string-append "stash_if_needed(" other ", Gitg.Ref? head"))))) (add-after 'glib-or-gtk-wrap 'wrap-typelib
(add-after 'glib-or-gtk-wrap 'wrap-typelib (lambda* (#:key outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys) (let ((prog (string-append #$output "/bin/gitg")))
(let ((prog (string-append (assoc-ref outputs "out") (wrap-program prog
"/bin/gitg"))) `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
(wrap-program prog
`("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
#t))))))
(inputs (inputs
(list glib (list glib
gsettings-desktop-schemas gsettings-desktop-schemas
@ -11403,12 +11400,12 @@ higher level porcelain stuff.")
libsoup-minimal-2 libsoup-minimal-2
libxml2)) libxml2))
(native-inputs (native-inputs
`(("glib:bin" ,glib "bin") (list `(,glib "bin")
("gtk+:bin" ,gtk+ "bin") `(,gtk+ "bin")
("gobject-introspection" ,gobject-introspection) gobject-introspection
("intltool" ,intltool) intltool
("pkg-config" ,pkg-config) pkg-config
("vala" ,vala))) vala))
(synopsis "Graphical user interface for git") (synopsis "Graphical user interface for git")
(description (description
"gitg is a graphical user interface for git. It aims at being a small, "gitg is a graphical user interface for git. It aims at being a small,