all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Cc: 40426@debbugs.gnu.org
Subject: [bug#40426] [PATCH] Add g-golf
Date: Tue, 14 Apr 2020 19:10:37 +0100	[thread overview]
Message-ID: <87eesq6iqq.fsf@cbaines.net> (raw)
In-Reply-To: <6xX3P5wtqPLaHAJcG08vvndO5ruSKavzCs0khwcdJmF2CYVGjPLz_J-2HZXM7vCKOcAiSqWHMFPG1-rQA04EWZ9YPqh6KA090K1BOwlAhpY=@protonmail.com>

[-- 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 --]

  parent reply	other threads:[~2020-04-14 18:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eesq6iqq.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=40426@debbugs.gnu.org \
    --cc=D0dyBo0D0dyBo0@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.