[PATCH] gnu: Add yad.

  • Done
  • quality assurance status badge
Details
3 participants
  • pimi
  • Ricardo Wurmus
  • Ricardo Wurmus
Owner
unassigned
Submitted by
pimi
Severity
normal

Debbugs page

pimi wrote 7 years ago
(address . guix-patches@gnu.org)(name . pimi)(address . madalinionel.patrascu@mdc-berlin.de)
20180830095152.8589-1-madalinionel.patrascu@mdc-berlin.de
gnu/packages/gtk.scm (yad): New variable.
---
gnu/packages/gtk.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 8b11e3fb1..9b20f4f96 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1651,3 +1652,44 @@ Parcellite and adds bugfixes and features.")
it does not deal with windowing system surfaces, drawing, scene graphs, or
input.")
(license license:expat)))
+
+(define-public yad
+ (package
+ (name "yad")
+ (version "0.40.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/v1cont/"name"/archive/v"version".tar.gz"))
+ (sha256
+ (base32 "1fs892d0xq2x43blqfxrlif22n1mnpbbw6lj8mfvm9j637m8hfm6"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ '("--with-gtk=gtk3"
+ "--enable-html"
+ "--enable-gio"
+ "--enable-spell"
+ "--enable-icon-browser")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-vif")
+ (invoke "intltoolize" "--force" "--automake")
+ #t)))))
+ (inputs
+ `(("gtk+" ,gtk+)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://sourceforge.net/projects/yad-dialog/")
+ (synopsis "Standard dialog boxes for Windows, MacOS and Linux")
+ (description
+ "This program allows you to display GTK+ dialog boxes from command line or shell
+scripts. More example of @code{yad} usage can be consulted at
+@url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}. The @code{yad}
+depends on GTK+ only.")
+ (license license:gpl3)))
--
2.17.1
Ricardo Wurmus wrote 7 years ago
(name . pimi)(address . madalinionel.patrasc@mdc-berlin.de)(address . 32584@debbugs.gnu.org)
idjin3m375y.fsf@bimsb-sys02.mdc-berlin.net
Hi,

thanks for the patch!

Toggle quote (1 lines)
> gnu/packages/gtk.scm (yad): New variable.
[…]
Toggle quote (10 lines)
> +(define-public yad
> + (package
> + (name "yad")
> + (version "0.40.3")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> "https://github.com/v1cont/"name"/archive/v"version".tar.gz"))

Please don’t use automatically generated tarballs, because they can
change over time. Github generates these tarballs on demand and caches
them for a long time, but they are not guaranteed to be permanent.
A regenerated tarball would have a different hash.

Please use git-fetch instead.

Toggle quote (2 lines)
> + (synopsis "Standard dialog boxes for Windows, MacOS and Linux")

Please use “GTK+ dialog boxes for shell scripts”.

Toggle quote (6 lines)
> + (description
> + "This program allows you to display GTK+ dialog boxes from command line or shell
> +scripts. More example of @code{yad} usage can be consulted at
> +@url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}. The @code{yad}
> +depends on GTK+ only.")

I think we can drop the last sentence. How about this:

This program allows you to display GTK+ dialog boxes from the command
line or shell scripts. Example of how to use @code{yad} usage can be

Toggle quote (2 lines)
> + (license license:gpl3)))

The source files say that it’s gpl3+. Here’s an excerpt from the header
of yad/src/color.c:

* YAD is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.

Could you please send an updated patch?

--
Ricardo
pimi wrote 7 years ago
(address . 32584@debbugs.gnu.org)(name . pimi)(address . madalinionel.patrascu@mdc-berlin.de)
20180905104237.29602-1-madalinionel.patrascu@mdc-berlin.de
gnu/packages/gtk.scm (yad): New variable
---
gnu/packages/gtk.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 6c43a3ab5..f89474fe9 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -1665,3 +1665,48 @@ Parcellite and adds bugfixes and features.")
it does not deal with windowing system surfaces, drawing, scene graphs, or
input.")
(license license:expat)))
+
+(define-public yad
+ (let ((commit "8957347fc6376bc4ec992adef078a7b53399850e")
+ (revision "1"))
+ (package
+ (name "yad")
+ (version (git-version "0.40.3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/v1cont/yad.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "04vqm6khqsaar25qa8xaixp6i1jp7v33b32f6i425kfdi6wfr2yb"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ '("--with-gtk=gtk3"
+ "--enable-html"
+ "--enable-gio"
+ "--enable-spell"
+ "--enable-icon-browser")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'bootstrap
+ (lambda _
+ (invoke "autoreconf" "-vif")
+ (invoke "intltoolize" "--force" "--automake")
+ #t)))))
+ (inputs
+ `(("gtk+" ,gtk+)))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("intltool" ,intltool)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://sourceforge.net/projects/yad-dialog/")
+ (synopsis "GTK+ dialog boxes for shell scripts")
+ (description
+ "This program allows you to display GTK+ dialog boxes from command line or
+shell scripts. Example of how to use @code{yad} can be consulted at
+@url{https://sourceforge.net/p/yad-dialog/wiki/browse_pages/}.")
+ (license license:gpl3+))))
--
2.17.1
Ricardo Wurmus wrote 7 years ago
(address . 32584@debbugs.gnu.org)
87sh2oxi1y.fsf@mdc-berlin.de
Hi pimi,

thanks for the update.

In this case you can avoid having to record the git commit that
corresponds to version 0.40.3 because that commit is tagged. You can
remove the “let”, keep “version” at “0.40.3”, and use “(commit version)”
instead of “(commit commit)”.

This would make the package description a little less confusing to read.

Does that make sense?

--
Ricardo
Ricardo Wurmus wrote 7 years ago
(address . MadalinIonel.Patrascu@mdc-berlin.de)(address . 32584-done@debbugs.gnu.org)
87o9d5ldsp.fsf@elephly.net
I made the suggested changes myself and pushed it to the “master” branch
with commit 57d70dbab.

Thanks!

--
Ricardo
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 32584
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