* [bug#40426] [PATCH] Add g-golf
@ 2020-04-04 11:58 Vitaliy Shatrov via Guix-patches via
2020-04-05 2:56 ` Mike Rosset
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-04 11:58 UTC (permalink / raw)
To: 40426
[-- Attachment #1.1: Type: text/plain, Size: 346 bytes --]
str1ngs and nly want it to be submitted to guix, and i was proudly take this task. Package was copied "as-is", and tested as per Guix manual.
There is desire to package be named "g-golf", and not as "guile-g-golf", as the package name stands for "Gnome: Guile Object Library For".
Sent with [ProtonMail](https://protonmail.com) Secure Email.
[-- Attachment #1.2: Type: text/html, Size: 649 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-g-golf.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-g-golf.patch", Size: 4411 bytes --]
From d5a29a7d6d61c9b0c2b9e548cd726062a3078407 Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Sat, 4 Apr 2020 18:41:38 +0700
Subject: [PATCH] gnu: Add g-golf
* gnu/packages/guile-xyz.scm (g-golf): New variable
---
gnu/packages/guile-xyz.scm | 79 ++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 62ebb8294f..f9251f0d2a 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3283,3 +3283,82 @@ Relay Chat} (IRC).")
WebSocket protocol as defined by RFC 6455.")
(home-page "https://git.dthompson.us/guile-websocket.git")
(license license:lgpl3+))))
+
+(define-public g-golf
+ (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7"))
+ (package
+ (name "g-golf")
+ (version (git-version "1" "683" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/g-golf.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "09p0gf71wbmlm9kri693a8fvr9hl3hhlmlidyadwjdh7853xg0h8"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("texinfo" ,texinfo)
+ ("gettext" ,gettext-minimal)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("guile-lib" ,guile-lib)
+ ("clutter" ,clutter)
+ ("gtk" ,gtk+)
+ ("glib" ,glib)))
+ (propagated-inputs
+ `(("gobject-introspection" ,gobject-introspection)))
+ (arguments
+ `(#:tests? #t
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'tests-work-arounds
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; In build environment, There is no /dev/tty
+ (substitute*
+ "test-suite/tests/gobject.scm"
+ (("/dev/tty") "/dev/null"))))
+ (add-before 'configure 'substitute-libs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((get (lambda (key lib)
+ (string-append (assoc-ref inputs key) "/lib/" lib)))
+ (libgi (get "gobject-introspection" "libgirepository-1.0"))
+ (libglib (get "glib" "libglib-2.0"))
+ (libgobject (get "glib" "libgobject-2.0"))
+ (libgdk (get "gtk" "libgdk-3")))
+ (substitute* "configure"
+ (("SITEDIR=\"\\$datadir/g-golf\"")
+ "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
+ (("SITECCACHEDIR=\"\\$libdir/g-golf/")
+ "SITECCACHEDIR=\"$libdir/"))
+ (substitute* "g-golf/init.scm"
+ (("libgirepository-1.0") libgi)
+ (("libglib-2.0") libglib)
+ (("libgdk-3") libgdk)
+ (("libgobject-2.0") libgobject)
+ (("\\(dynamic-link \"libg-golf\"\\)")
+ (format #f "~s"
+ `(dynamic-link
+ (format #f "~alibg-golf"
+ (if (getenv "GUILE_GGOLF_UNINSTALLED")
+ ""
+ ,(format #f "~a/lib/"
+ (assoc-ref outputs "out"))))))))
+ (setenv "GUILE_AUTO_COMPILE" "0")
+ (setenv "GUILE_GGOLF_UNINSTALLED" "1")
+ #t))))))
+ (home-page "https://www.gnu.org/software/g-golf/")
+ (synopsis "Guile bindings for GObject Introspection")
+ (description
+ "G-Golf (Gnome: (Guile Object Library for)) is a library for developing
+applications in Guile Scheme. It comprises a direct binding to the low level
+GObject Introspection API and higher-level functionality for importing Gnome
+libraries and making GObject classes (and methods) available in Guile's
+object-oriented programming system, GOOPS.")
+ (license license:lgpl3+))))
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-04 11:58 [bug#40426] [PATCH] Add g-golf Vitaliy Shatrov via Guix-patches via
@ 2020-04-05 2:56 ` Mike Rosset
2020-04-14 18:10 ` Christopher Baines
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Mike Rosset @ 2020-04-05 2:56 UTC (permalink / raw)
To: D0dyBo0D0dyBo0, 40426
Vitaliy Shatrov via Guix-patches via writes:
> str1ngs and nly want it to be submitted to guix, and i was proudly take this task. Package was copied "as-is", and tested as per Guix manual.
> There is desire to package be named "g-golf", and not as "guile-g-golf", as the package name stands for "Gnome: Guile Object Library For".
>
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
Thank you Vitaliy,
I appreciate you submitting this patch for us.
We've been using g-golf sometime in Nomad, though Nomad and g-golf are
still pretty much WIP. We thought it would be nice to get g-golf
included into guix as a preliminary for Nomad's next replease, which ports
most of the C code to scheme using g-golf.
We've been using this current declaration for sometime and it's been
working quite well so far.
If anyone has some feedbak on it please let us know.
Mike
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-04 11:58 [bug#40426] [PATCH] Add g-golf Vitaliy Shatrov via Guix-patches via
2020-04-05 2:56 ` Mike Rosset
@ 2020-04-14 18:10 ` Christopher Baines
2020-04-15 5:56 ` Mike Rosset
2020-04-15 7:15 ` [bug#40426] v2, cleared Vitaliy Shatrov via Guix-patches via
2020-04-15 13:57 ` [bug#40426] [PATCH] Add g-golf Tobias Geerinckx-Rice via Guix-patches via
3 siblings, 1 reply; 10+ messages in thread
From: Christopher Baines @ 2020-04-14 18:10 UTC (permalink / raw)
To: Vitaliy Shatrov; +Cc: 40426
[-- Attachment #1: Type: text/plain, Size: 4620 bytes --]
Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:
> str1ngs and nly want it to be submitted to guix, and i was proudly
> take this task. Package was copied "as-is", and tested as per Guix
> manual. There is desire to package be named "g-golf", and not as
> "guile-g-golf", as the package name stands for "Gnome: Guile Object
> Library For".
Thanks for the patch,
> +(define-public g-golf
> + (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7"))
> + (package
> + (name "g-golf")
> + (version (git-version "1" "683" commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://git.savannah.gnu.org/git/g-golf.git")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "09p0gf71wbmlm9kri693a8fvr9hl3hhlmlidyadwjdh7853xg0h8"))))
> + (build-system gnu-build-system)
> + (native-inputs
> + `(("autoconf" ,autoconf)
> + ("automake" ,automake)
> + ("texinfo" ,texinfo)
> + ("gettext" ,gettext-minimal)
> + ("libtool" ,libtool)
> + ("pkg-config" ,pkg-config)))
> + (inputs
> + `(("guile" ,guile-2.2)
Does g-golf work with Guile 3 yet? If not, that's OK.
> + ("guile-lib" ,guile-lib)
> + ("clutter" ,clutter)
> + ("gtk" ,gtk+)
> + ("glib" ,glib)))
> + (propagated-inputs
> + `(("gobject-introspection" ,gobject-introspection)))
> + (arguments
> + `(#:tests? #t
I'd remove the #:tests? argument given the default value of #t is fine.
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'tests-work-arounds
> + (lambda* (#:key inputs #:allow-other-keys)
> + ;; In build environment, There is no /dev/tty
> + (substitute*
> + "test-suite/tests/gobject.scm"
> + (("/dev/tty") "/dev/null"))))
> + (add-before 'configure 'substitute-libs
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((get (lambda (key lib)
> + (string-append (assoc-ref inputs key) "/lib/" lib)))
> + (libgi (get "gobject-introspection" "libgirepository-1.0"))
> + (libglib (get "glib" "libglib-2.0"))
> + (libgobject (get "glib" "libgobject-2.0"))
> + (libgdk (get "gtk" "libgdk-3")))
> + (substitute* "configure"
> + (("SITEDIR=\"\\$datadir/g-golf\"")
> + "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
> + (("SITECCACHEDIR=\"\\$libdir/g-golf/")
> + "SITECCACHEDIR=\"$libdir/"))
> + (substitute* "g-golf/init.scm"
> + (("libgirepository-1.0") libgi)
> + (("libglib-2.0") libglib)
> + (("libgdk-3") libgdk)
> + (("libgobject-2.0") libgobject)
> + (("\\(dynamic-link \"libg-golf\"\\)")
> + (format #f "~s"
> + `(dynamic-link
> + (format #f "~alibg-golf"
> + (if (getenv "GUILE_GGOLF_UNINSTALLED")
> + ""
> + ,(format #f "~a/lib/"
> + (assoc-ref outputs "out"))))))))
> + (setenv "GUILE_AUTO_COMPILE" "0")
> + (setenv "GUILE_GGOLF_UNINSTALLED" "1")
I don't quite follow this GUILE_GGOLF_UNINSTALLED environment
variable. Why not just use the absolute filename for the so file
(without the extension I think)?
Also, maybe delete the strip phase, as I don't think that does anything
apart from producing a load of warnings.
> + #t))))))
> + (home-page "https://www.gnu.org/software/g-golf/")
> + (synopsis "Guile bindings for GObject Introspection")
> + (description
> + "G-Golf (Gnome: (Guile Object Library for)) is a library for developing
> +applications in Guile Scheme. It comprises a direct binding to the low level
> +GObject Introspection API and higher-level functionality for importing Gnome
> +libraries and making GObject classes (and methods) available in Guile's
This looks pretty good to me, just a few things to clear up :)
Thanks,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-14 18:10 ` Christopher Baines
@ 2020-04-15 5:56 ` Mike Rosset
2020-04-15 8:24 ` Christopher Baines
0 siblings, 1 reply; 10+ messages in thread
From: Mike Rosset @ 2020-04-15 5:56 UTC (permalink / raw)
To: 40426; +Cc: D0dyBo0D0dyBo0
Christopher Baines writes:
> Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:
>
> Does g-golf work with Guile 3 yet? If not, that's OK.
>
Hello Christopher, thanks for looking at this.
I did quick look at seeing if g-golf would work with guile 3.0. But I
ran into some issue with core module bindings. Since g-golf very much
WIP and like wise Nomad which is my primary use for g-golf is also
WIP. I've kept strictly to guile 2.2 for now to maintain a little extra
stability. I'll follow up on it when both nomad a g-golf are more
stable.
>
> I'd remove the #:tests? argument given the default value of #t is fine.
>
Not a problem either myself or Vitality will add a follow up
patch. This was orphaned since we just recently got tests working.
> I don't quite follow this GUILE_GGOLF_UNINSTALLED environment
> variable. Why not just use the absolute filename for the so file
> (without the extension I think)?
The problem here is that libg-golf is needed both at compile time and
runtime. So it can not be substituted say after the unpack stage. So
this just checks if GUILE_GGOLF_UNINSTALLED is set. Then it will
use libg-golf with normal dynamic-link search paths. Other wise it uses
the full store path.
I had discussed this scenario with the g-golf author, his
recommendation was to use this approach it's the same one used for the
guile-cv declaration. He's the author of guile-cv as well.
> Also, maybe delete the strip phase, as I don't think that does anything
> apart from producing a load of warnings.
>
I think the strip phase strips dynamic elf libraries as well? I
don't think it would hurt here to keep it for libg-golf at least?
Would you also be able to look at bug#40512 Christopher? That one is a
trivial review just some upstream bug fixes for Emacsy and a hash bump
in the package declaration. Technically not related to the patch. But
eventually I'll need both of these when I release the next version of
nomad.
Regards,
Mike
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#40426] v2, cleared
2020-04-04 11:58 [bug#40426] [PATCH] Add g-golf Vitaliy Shatrov via Guix-patches via
2020-04-05 2:56 ` Mike Rosset
2020-04-14 18:10 ` Christopher Baines
@ 2020-04-15 7:15 ` Vitaliy Shatrov via Guix-patches via
2020-04-15 12:22 ` bug#40426: " Christopher Baines
2020-04-15 13:57 ` [bug#40426] [PATCH] Add g-golf Tobias Geerinckx-Rice via Guix-patches via
3 siblings, 1 reply; 10+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-15 7:15 UTC (permalink / raw)
To: 40426@debbugs.gnu.org
[-- Attachment #1.1: Type: text/plain, Size: 41 bytes --]
tests #t -- removed;
trying another desc.
[-- Attachment #1.2: Type: text/html, Size: 70 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-g-golf.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-g-golf.patch", Size: 4301 bytes --]
From a1eec269a63f78e370d945e5b065bcb8274b1eaa Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Wed, 15 Apr 2020 14:02:13 +0700
Subject: [PATCH] gnu: Add g-golf
* gnu/packages/guile-xyz.scm (g-golf): New variable
---
gnu/packages/guile-xyz.scm | 77 ++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index e1fcc12229..61dae6be41 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3271,3 +3271,80 @@ Relay Chat} (IRC).")
WebSocket protocol as defined by RFC 6455.")
(home-page "https://git.dthompson.us/guile-websocket.git")
(license license:lgpl3+))))
+
+
+(define-public g-golf
+ (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7"))
+ (package
+ (name "g-golf")
+ (version (git-version "1" "683" commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/g-golf.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "09p0gf71wbmlm9kri693a8fvr9hl3hhlmlidyadwjdh7853xg0h8"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("texinfo" ,texinfo)
+ ("gettext" ,gettext-minimal)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,guile-2.2)
+ ("guile-lib" ,guile-lib)
+ ("clutter" ,clutter)
+ ("gtk" ,gtk+)
+ ("glib" ,glib)))
+ (propagated-inputs
+ `(("gobject-introspection" ,gobject-introspection)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'tests-work-arounds
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; In build environment, There is no /dev/tty
+ (substitute*
+ "test-suite/tests/gobject.scm"
+ (("/dev/tty") "/dev/null"))))
+ (add-before 'configure 'substitute-libs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((get (lambda (key lib)
+ (string-append (assoc-ref inputs key) "/lib/" lib)))
+ (libgi (get "gobject-introspection" "libgirepository-1.0"))
+ (libglib (get "glib" "libglib-2.0"))
+ (libgobject (get "glib" "libgobject-2.0"))
+ (libgdk (get "gtk" "libgdk-3")))
+ (substitute* "configure"
+ (("SITEDIR=\"\\$datadir/g-golf\"")
+ "SITEDIR=\"$datadir/guile/site/$GUILE_EFFECTIVE_VERSION\"")
+ (("SITECCACHEDIR=\"\\$libdir/g-golf/")
+ "SITECCACHEDIR=\"$libdir/"))
+ (substitute* "g-golf/init.scm"
+ (("libgirepository-1.0") libgi)
+ (("libglib-2.0") libglib)
+ (("libgdk-3") libgdk)
+ (("libgobject-2.0") libgobject)
+ (("\\(dynamic-link \"libg-golf\"\\)")
+ (format #f "~s"
+ `(dynamic-link
+ (format #f "~alibg-golf"
+ (if (getenv "GUILE_GGOLF_UNINSTALLED")
+ ""
+ ,(format #f "~a/lib/"
+ (assoc-ref outputs "out"))))))))
+ (setenv "GUILE_AUTO_COMPILE" "0")
+ (setenv "GUILE_GGOLF_UNINSTALLED" "1")
+ #t))))))
+ (home-page "https://www.gnu.org/software/g-golf/")
+ (synopsis "G-Golf is a Guile Object Library for GNOME")
+ (description "G-Golf low level API comprises a binding to - (most of) the
+GObject Introspection and (some of) the GObject and Glib libraries, as well as
+additional (G-Golf) utilities - used to import GObject libraries and build
+their corresponding G-Golf high level API.")
+ (license license:lgpl3+))))
--
2.26.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-15 5:56 ` Mike Rosset
@ 2020-04-15 8:24 ` Christopher Baines
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Baines @ 2020-04-15 8:24 UTC (permalink / raw)
To: Mike Rosset; +Cc: D0dyBo0D0dyBo0, 40426
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
Mike Rosset <mike.rosset@gmail.com> writes:
> Christopher Baines writes:
>
>> Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:
>>
>> Does g-golf work with Guile 3 yet? If not, that's OK.
>>
> Hello Christopher, thanks for looking at this.
>
> I did quick look at seeing if g-golf would work with guile 3.0. But I
> ran into some issue with core module bindings. Since g-golf very much
> WIP and like wise Nomad which is my primary use for g-golf is also
> WIP. I've kept strictly to guile 2.2 for now to maintain a little extra
> stability. I'll follow up on it when both nomad a g-golf are more
> stable.
Sure, no problem.
>> I don't quite follow this GUILE_GGOLF_UNINSTALLED environment
>> variable. Why not just use the absolute filename for the so file
>> (without the extension I think)?
>
>
> The problem here is that libg-golf is needed both at compile time and
> runtime. So it can not be substituted say after the unpack stage. So
> this just checks if GUILE_GGOLF_UNINSTALLED is set. Then it will
> use libg-golf with normal dynamic-link search paths. Other wise it uses
> the full store path.
>
> I had discussed this scenario with the g-golf author, his
> recommendation was to use this approach it's the same one used for the
> guile-cv declaration. He's the author of guile-cv as well.
Right, so it's something to help build the Guix package. I think I
understand now.
>> Also, maybe delete the strip phase, as I don't think that does anything
>> apart from producing a load of warnings.
>>
>
> I think the strip phase strips dynamic elf libraries as well? I
> don't think it would hurt here to keep it for libg-golf at least?
Sure, it's OK to keep it as well.
> Would you also be able to look at bug#40512 Christopher? That one is a
> trivial review just some upstream bug fixes for Emacsy and a hash bump
> in the package declaration. Technically not related to the patch. But
> eventually I'll need both of these when I release the next version of
> nomad.
I've gone ahead and merged the emacsy-minimal update, I'll send an email
to that bug in a minute.
Thanks,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#40426: v2, cleared
2020-04-15 7:15 ` [bug#40426] v2, cleared Vitaliy Shatrov via Guix-patches via
@ 2020-04-15 12:22 ` Christopher Baines
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Baines @ 2020-04-15 12:22 UTC (permalink / raw)
To: Vitaliy Shatrov; +Cc: 40426-done
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:
> tests #t -- removed;
> trying another desc.
Thanks, I've gone ahead and pushed this to master as
dfe277a5ce60d487fe44840506206fea8507bc69.
I moved the package definition up a bit in the file, just so its not at
the bottom, which can help to avoid merge conflicts.
I also used the synopsis/description from the initial patch, mostly to
avoid the lint warnings.
Thanks again,
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-04 11:58 [bug#40426] [PATCH] Add g-golf Vitaliy Shatrov via Guix-patches via
` (2 preceding siblings ...)
2020-04-15 7:15 ` [bug#40426] v2, cleared Vitaliy Shatrov via Guix-patches via
@ 2020-04-15 13:57 ` Tobias Geerinckx-Rice via Guix-patches via
2020-04-15 16:47 ` Mike Rosset
2020-04-15 23:02 ` Mike Rosset
3 siblings, 2 replies; 10+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-04-15 13:57 UTC (permalink / raw)
To: Vitaliy Shatrov; +Cc: 40426
[-- Attachment #1: Type: text/plain, Size: 2959 bytes --]
Vitaliy,
Vitaliy Shatrov via Guix-patches via 写道:
> str1ngs and nly want it to be submitted to guix, and i was
> proudly take this task. Package was copied "as-is", and tested
> as per Guix manual.
Thank you!
> There is desire to package be named "g-golf", and not as
> "guile-g-golf", as the package name stands for "Gnome: Guile
> Object Library For".
Too clever for me :-) It's a Guile library; hence the correct
Guix name (and variable) is ‘guile-g-golf’. We have plenty of
‘python-pyfoo’ packages to keep it company.
> Subject: [PATCH] gnu: Add g-golf
>
> * gnu/packages/guile-xyz.scm (g-golf): New variable
Nitpick: both lines should end with a full stop.
> +(define-public g-golf
Could you add a comment here explaining why we use a git commit,
instead of a release tarball or tag? I assume there are none;
that would do as comment. However…
> + (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7"))
> + (package
> + (name "g-golf")
> + (version (git-version "1" "683" commit))
…‘1’ means the project has released version 1 prior to this
commit, or at least regards this commit as part of the ‘1’ series.
I didn't spot any version number on the home page, NEWS file, git
tags, …
If there is no ‘1’ release, use ‘0.0.0’.
The second field (REVISION) should be ‘0’, since this is the first
*Guix* revision of this package. The idea is that you increment
the revision each time you change COMMIT, so Guix knows which
commit is newer and can ‘guix package -u’ properly.
Since the 2 should be updated together, bind them together:
(let ((commit "f00")
(revision "0")) …
You obviously got ‘683’ from somewhere though. Where?
> + `(#:tests? #t
Does the guile-build-system disable tests by default? (I skimmed
the code but didn't find anything.) Otherwise, this can be
omitted.
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'tests-work-arounds
Prefer ‘verb-thing’; makes it much easier to skim unfamiliar
packages.
In this case we're not really working around the tests themselves,
so I'd go with the boring ‘patch-tests’.
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; In build environment, There is no /dev/tty
+ (substitute*
+ "test-suite/tests/gobject.scm"
+ (("/dev/tty") "/dev/null"))))
For now, all phases must return #t. SUBSTITUTE* doesn't, so we
need
(lambda …
…
(substitute* "test-suite/tests/gobject.scm"
(("/dev/tty") "/dev/null"))
#t)
No need to put the file name on its own line here.
+ (add-before 'configure 'substitute-libs
Bytes are cheap: ‘libraries’.
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-15 13:57 ` [bug#40426] [PATCH] Add g-golf Tobias Geerinckx-Rice via Guix-patches via
@ 2020-04-15 16:47 ` Mike Rosset
2020-04-15 23:02 ` Mike Rosset
1 sibling, 0 replies; 10+ messages in thread
From: Mike Rosset @ 2020-04-15 16:47 UTC (permalink / raw)
To: me, 40426; +Cc: D0dyBo0D0dyBo0
[-- Attachment #1: Type: text/plain, Size: 446 bytes --]
Tobias Geerinckx-Rice via Guix-patches via writes:
> Vitaliy,
>
> Vitaliy Shatrov via Guix-patches via 写道:
>> str1ngs and nly want it to be submitted to guix, and i was proudly
>> take this task. Package was copied "as-is", and tested as per Guix
>> manual.
>
> Thank you!
Tobias, this has already been merged with
dfe277a5ce60d487fe44840506206fea8507bc69. I will though address your
comments with this attached patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-g-golf-Fix-version-to-0.0.0-0.4a4edf2.patch --]
[-- Type: text/x-patch, Size: 2077 bytes --]
From 1b230e6e000b57bfa3d2b4ef63a894e5e02195d5 Mon Sep 17 00:00:00 2001
From: Mike Rosset <mike.rosset@gmail.com>
Date: Wed, 15 Apr 2020 09:41:10 -0700
Subject: [PATCH] gnu: g-golf: Fix version to 0.0.0-0.4a4edf2
* gnu/packages/guile-xyz.scm (g-golf): Fix version to 0.0.0-0.4a4edf2.
---
gnu/packages/guile-xyz.scm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index ebd7d89dec..58938268e4 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1652,10 +1652,13 @@ capabilities.")
(license license:gpl3+)))
(define-public g-golf
- (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7"))
+ (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7")
+ (revision "0"))
(package
(name "g-golf")
- (version (git-version "1" "683" commit))
+ (version (git-version "0.0.0" revision commit))
+ ;; g-golf is still work in progress. Since there are no release
+ ;; tarballs we use git for sources.
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1684,13 +1687,13 @@ capabilities.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'configure 'tests-work-arounds
+ (add-before 'configure 'substitue-tty-test
(lambda* (#:key inputs #:allow-other-keys)
;; In build environment, There is no /dev/tty
- (substitute*
- "test-suite/tests/gobject.scm"
- (("/dev/tty") "/dev/null"))))
- (add-before 'configure 'substitute-libs
+ (substitute* "test-suite/tests/gobject.scm"
+ (("/dev/tty") "/dev/null")
+ #t)))
+ (add-before 'configure 'substitute-libriaries
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((get (lambda (key lib)
(string-append (assoc-ref inputs key) "/lib/" lib)))
--
2.26.0
[-- Attachment #3: Type: text/plain, Size: 1951 bytes --]
> Too clever for me :-) It's a Guile library; hence the correct Guix
> name (and variable) is ‘guile-g-golf’. We have plenty of
> ‘python-pyfoo’ packages to keep it company.
>
No. I can't change this to guile-g-golf. The author of g-golf has
explicated stated they would like the package name to be g-golf.
> Could you add a comment here explaining why we use a git commit,
> instead of a release tarball or tag? I assume there are none; that
> would do as comment. However…
I've added a comment for why git sources are used.
> …‘1’ means the project has released version 1 prior to this commit, or
> at least regards this commit as part of the ‘1’ series. I didn't spot
> any version number on the home page, NEWS file, git tags, …
>
> If there is no ‘1’ release, use ‘0.0.0’.
>
> The second field (REVISION) should be ‘0’, since this is the first
> *Guix* revision of this package. The idea is that you increment the
> revision each time you change COMMIT, so Guix knows which commit is
> newer and can ‘guix package -u’ properly.
>
> Since the 2 should be updated together, bind them together:
>
> (let ((commit "f00")
> (revision "0")) …
>
> You obviously got ‘683’ from somewhere though. Where?
>
This is fixed now, this got carried over from me tracking upstream
revisions. I've reset it to version 0.0.0 and revision 0. This is
probably the most important fix.
> Prefer ‘verb-thing’; makes it much easier to skim unfamiliar packages.
>
done
>
> For now, all phases must return #t. SUBSTITUTE* doesn't, so we need
>
> (lambda …
> …
> (substitute* "test-suite/tests/gobject.scm"
> (("/dev/tty") "/dev/null"))
> #t)
done
> No need to put the file name on its own line here.
>
> + (add-before 'configure 'substitute-libs
done
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#40426] [PATCH] Add g-golf
2020-04-15 13:57 ` [bug#40426] [PATCH] Add g-golf Tobias Geerinckx-Rice via Guix-patches via
2020-04-15 16:47 ` Mike Rosset
@ 2020-04-15 23:02 ` Mike Rosset
1 sibling, 0 replies; 10+ messages in thread
From: Mike Rosset @ 2020-04-15 23:02 UTC (permalink / raw)
To: me, 40426; +Cc: D0dyBo0D0dyBo0
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
Tobias Geerinckx-Rice via Guix-patches via writes:
>
> …‘1’ means the project has released version 1 prior to this commit, or
> at least regards this commit as part of the ‘1’ series. I didn't spot
> any version number on the home page, NEWS file, git tags, …
>
> If there is no ‘1’ release, use ‘0.0.0’.
>
> The second field (REVISION) should be ‘0’, since this is the first
> *Guix* revision of this package. The idea is that you increment the
> revision each time you change COMMIT, so Guix knows which commit is
> newer and can ‘guix package -u’ properly.
>
> Since the 2 should be updated together, bind them together:
>
> (let ((commit "f00")
> (revision "0")) …
Slight change to my follow up patch, version should be 0.1.0.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-g-golf-Fix-version-to-0.1.0-0.4a4edf2.patch --]
[-- Type: text/x-patch, Size: 2077 bytes --]
From 31947bce363b87b2f82e98f69704296b22a1be47 Mon Sep 17 00:00:00 2001
From: Mike Rosset <mike.rosset@gmail.com>
Date: Wed, 15 Apr 2020 09:41:10 -0700
Subject: [PATCH] gnu: g-golf: Fix version to 0.1.0-0.4a4edf2
* gnu/packages/guile-xyz.scm (g-golf): Fix version to 0.1.0-0.4a4edf2.
---
gnu/packages/guile-xyz.scm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index ebd7d89dec..f725280ce1 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1652,10 +1652,13 @@ capabilities.")
(license license:gpl3+)))
(define-public g-golf
- (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7"))
+ (let ((commit "4a4edf25e4877df9182c77843bdd98ab59e13ef7")
+ (revision "0"))
(package
(name "g-golf")
- (version (git-version "1" "683" commit))
+ (version (git-version "0.1.0" revision commit))
+ ;; g-golf is still work in progress. Since there are no release
+ ;; tarballs we use git for sources.
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1684,13 +1687,13 @@ capabilities.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'configure 'tests-work-arounds
+ (add-before 'configure 'substitue-tty-test
(lambda* (#:key inputs #:allow-other-keys)
;; In build environment, There is no /dev/tty
- (substitute*
- "test-suite/tests/gobject.scm"
- (("/dev/tty") "/dev/null"))))
- (add-before 'configure 'substitute-libs
+ (substitute* "test-suite/tests/gobject.scm"
+ (("/dev/tty") "/dev/null")
+ #t)))
+ (add-before 'configure 'substitute-libriaries
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((get (lambda (key lib)
(string-append (assoc-ref inputs key) "/lib/" lib)))
--
2.26.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-04-15 23:03 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-04 11:58 [bug#40426] [PATCH] Add g-golf Vitaliy Shatrov via Guix-patches via
2020-04-05 2:56 ` Mike Rosset
2020-04-14 18:10 ` Christopher Baines
2020-04-15 5:56 ` Mike Rosset
2020-04-15 8:24 ` Christopher Baines
2020-04-15 7:15 ` [bug#40426] v2, cleared Vitaliy Shatrov via Guix-patches via
2020-04-15 12:22 ` bug#40426: " Christopher Baines
2020-04-15 13:57 ` [bug#40426] [PATCH] Add g-golf Tobias Geerinckx-Rice via Guix-patches via
2020-04-15 16:47 ` Mike Rosset
2020-04-15 23:02 ` Mike Rosset
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.