all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
To: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Cc: 40426@debbugs.gnu.org
Subject: [bug#40426] [PATCH] Add g-golf
Date: Wed, 15 Apr 2020 15:57:03 +0200	[thread overview]
Message-ID: <87ftd426p6.fsf@nckx> (raw)
In-Reply-To: <6xX3P5wtqPLaHAJcG08vvndO5ruSKavzCs0khwcdJmF2CYVGjPLz_J-2HZXM7vCKOcAiSqWHMFPG1-rQA04EWZ9YPqh6KA090K1BOwlAhpY=@protonmail.com>

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

  parent reply	other threads:[~2020-04-15 13:58 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
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 ` Tobias Geerinckx-Rice via Guix-patches via [this message]
2020-04-15 16:47   ` [bug#40426] [PATCH] Add g-golf 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=87ftd426p6.fsf@nckx \
    --to=guix-patches@gnu.org \
    --cc=40426@debbugs.gnu.org \
    --cc=D0dyBo0D0dyBo0@protonmail.com \
    --cc=me@tobias.gr \
    /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.