Add gitg

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Prikler
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Leo Prikler
Severity
normal

Debbugs page

Leo Prikler wrote 5 years ago
(address . guix-patches@gnu.org)
d8c6f7121f05e579f20456a41048ea818a4cefd2.camel@student.tugraz.at
This patch adds gitg, the GNOME graphical interface to git.

The package contains failing tests, so I've disabled them altogether
for now. I've tried setting up an X display, thinking it could aid the
situation, but that only leads to a timeout in another test. I'm a bit
at a loss here.

Regards,

Leo
From b50d9bf54d42461c2ed5d9e3b348fc5ee04434a0 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Tue, 29 Oct 2019 23:30:16 +0100
Subject: [PATCH] gnu: Add gitg.

* gnu/packages/gnome.scm: (gitg): New variable.
---
gnu/packages/gnome.scm | 63 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3c7882ca3d..76031cb673 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8401,6 +8401,69 @@ higher level porcelain stuff.")
(home-page "https://wiki.gnome.org/Projects/Libgit2-glib")
(license license:gpl2+)))
+(define-public gitg
+ (package
+ (name "gitg")
+ (version "3.32.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0npg4kqpwl992fgjd2cn3fh84aiwpdp9kd8z7rw2xaj2iazsm914"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:glib-or-gtk? #t
+ #:tests? #f ; TODO: investigate test failure
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-post-install-partially
+ (lambda _
+ (substitute* "meson_post_install.py"
+ (("'python'") ; there are no python sources to compile
+ (string-append "'" (which "true") "'"))
+ (("gtk-update-icon-cache") (which "true")))
+ #t))
+ (add-after 'glib-or-gtk-wrap 'wrap-typelib
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prog (string-append (assoc-ref outputs "out")
+ "/bin/gitg")))
+ (wrap-program prog
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
+ #t))))))
+ (inputs
+ `(("glib" ,glib)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gtk+" ,gtk+)
+ ("gtkspell3" ,gtkspell3)
+ ("gtksourceview" ,gtksourceview-3)
+ ("json-glib" ,json-glib)
+ ("libdazzle" ,libdazzle)
+ ("libgee" ,libgee)
+ ("libgit2" ,libgit2) ; propagated by libgit2-glib
+ ("libgit2-glib" ,libgit2-glib)
+ ("libpeas" ,libpeas)
+ ("libsecret" ,libsecret)
+ ("libsoup" ,libsoup)
+ ("libxml2" ,libxml2)))
+ (native-inputs
+ `(("glib:bin" ,glib "bin")
+ ("gtk+:bin" ,gtk+ "bin")
+ ("gobject-introspection" ,gobject-introspection)
+ ("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)
+ ("vala" ,vala)))
+ (synopsis "Graphical user interface for git")
+ (description
+ "gitg is a graphical user interface for git. It aims at being a small,
+fast and convenient tool to visualize the history of git repositories.
+Besides visualization, gitg also provides several utilities to manage your
+repository and commit your work.")
+ (home-page "https://wiki.gnome.org/Apps/gitg")
+ (license license:gpl2+)))
+
(define-public gnome-mahjongg
(package
(name "gnome-mahjongg")
--
2.23.0
Mathieu Othacehe wrote 5 years ago
(address . guix-patches@gnu.org)(address . 37987@debbugs.gnu.org)
87tv7qbljo.fsf@gmail.com
Hello Leo,

Toggle quote (5 lines)
> The package contains failing tests, so I've disabled them altogether
> for now. I've tried setting up an X display, thinking it could aid the
> situation, but that only leads to a timeout in another test. I'm a bit
> at a loss here.

Your patch LGTM. About failing test, I see that nix runs them and has a
small fix to substitute bash path:

Toggle snippet (3 lines)
substituteInPlace tests/libgitg/test-commit.vala --replace "/bin/bash" "${bash}/bin/bash"

Have you tried something like that?

Thanks,

Mathieu
Leo Prikler wrote 5 years ago
[bug#37987] Add gitg
(address . m.othacehe@gmail.com)(address . 37987@debbugs.gnu.org)
fd6f79afed30103bdc97fb97ba74c5239d0b40cf.camel@student.tugraz.at
Toggle quote (11 lines)
> Your patch LGTM. About failing test, I see that nix runs them and has
> a
> small fix to substitute bash path:
>
> --8<---------------cut here---------------start------------->8---
> substituteInPlace tests/libgitg/test-commit.vala --replace
> "/bin/bash"
> "${bash}/bin/bash"
> --8<---------------cut here---------------end--------------->8---
>
> Have you tried something like that?
That does seem to work. I've updated the patch.

Regards,

Leo
From 3915d6a47381cb835599e9fd6744f733144f0f30 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Tue, 29 Oct 2019 23:30:16 +0100
Subject: [PATCH] gnu: Add gitg.

* gnu/packages/gnome.scm: (gitg): New variable.
---
gnu/packages/gnome.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (78 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 276fa56..05ff728 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8400,6 +8400,73 @@ higher level porcelain stuff.")
(home-page "https://wiki.gnome.org/Projects/Libgit2-glib")
(license license:gpl2+)))
+(define-public gitg
+ (package
+ (name "gitg")
+ (version "3.32.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnome/sources/" name "/"
+ (version-major+minor version) "/"
+ name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0npg4kqpwl992fgjd2cn3fh84aiwpdp9kd8z7rw2xaj2iazsm914"))))
+ (build-system meson-build-system)
+ (arguments
+ `(#:glib-or-gtk? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-post-install-partially
+ (lambda _
+ (substitute* "meson_post_install.py"
+ (("'python'") ; there are no python sources to compile
+ (string-append "'" (which "true") "'"))
+ (("gtk-update-icon-cache") (which "true")))
+ #t))
+ (add-after 'unpack 'fix-test-sources
+ (lambda _
+ (substitute* "tests/libgitg/test-commit.vala"
+ (("/bin/bash") (which "bash")))
+ #t))
+ (add-after 'glib-or-gtk-wrap 'wrap-typelib
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prog (string-append (assoc-ref outputs "out")
+ "/bin/gitg")))
+ (wrap-program prog
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))
+ #t))))))
+ (inputs
+ `(("glib" ,glib)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gtk+" ,gtk+)
+ ("gtkspell3" ,gtkspell3)
+ ("gtksourceview" ,gtksourceview-3)
+ ("json-glib" ,json-glib)
+ ("libdazzle" ,libdazzle)
+ ("libgee" ,libgee)
+ ("libgit2" ,libgit2) ; propagated by libgit2-glib
+ ("libgit2-glib" ,libgit2-glib)
+ ("libpeas" ,libpeas)
+ ("libsecret" ,libsecret)
+ ("libsoup" ,libsoup)
+ ("libxml2" ,libxml2)))
+ (native-inputs
+ `(("glib:bin" ,glib "bin")
+ ("gtk+:bin" ,gtk+ "bin")
+ ("gobject-introspection" ,gobject-introspection)
+ ("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)
+ ("vala" ,vala)))
+ (synopsis "Graphical user interface for git")
+ (description
+ "gitg is a graphical user interface for git. It aims at being a small,
+fast and convenient tool to visualize the history of git repositories.
+Besides visualization, gitg also provides several utilities to manage your
+repository and commit your work.")
+ (home-page "https://wiki.gnome.org/Apps/gitg")
+ (license license:gpl2+)))
+
(define-public gnome-mahjongg
(package
(name "gnome-mahjongg")
--
libgit2 0.28.2
Mathieu Othacehe wrote 5 years ago
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
874kzqjjfe.fsf@gmail.com
Toggle quote (3 lines)
>> Have you tried something like that?
> That does seem to work. I've updated the patch.

Pushed with a minor edit to home-page field!

Thanks,

Mathieu
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 37987@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 37987
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help