Subject: Re: [bug#76246] [PATCH 1/2] gnu: Add guile-cairo-next.

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 13 Feb 2025 17:52:10 +0900

Hi,

Florian Pelz <[email-masked]> writes:

> From: "pelzflorian (Florian Pelz)" <[email-masked]>
>
> * gnu/packages/patches/guile-cairo-fix-make-check.patch: New patch.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> * gnu/packages/gtk.scm (guile-cairo-next): New variable.

[...]

> +(define-public guile-cairo-next
> +  (package
> +    (inherit guile-cairo)
> +    (name "guile-cairo-next")

Typicall when using a specific commit, we let-bind REVISION and COMMIT
variables, so that any reworked package can have revision bumped (I
think that's useful to select the latest version in case multiple
same-named packages exist?).

The version would be computed via

--8<---------------cut here---------------start------------->8---
(version (git-version "last-release-version-string" revision commit))
--8<---------------cut here---------------end--------------->8---

> +    ;; A commit with cairo-pointer->context, missing from [email-masked]
> +    ;; and needed by animated-paintable from g-golf-gtk-4-examples.
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "git://git.savannah.nongnu.org/guile-cairo.git")
> +                    (commit "30da459d7a4380174ff243b1560d5512a4bca86e")))
> +              (sha256
> +               (base32
> +                "0dslfldzgxis8g0g3xaffcqnd1njzz23fjy0v3lc0r2694ra4ny4"))
> +              ;; A patch to allow running the check phase before install.
> +              (patches (search-patches "guile-cairo-fix-make-check.patch"))
> +              (file-name (string-append "guile-cairo-next"))))

There's also a git-file-name helper to compute file-name.  If you use
Emacs + yasnippet, you should be able to do:

origin...TAB

to have it expanded into the idiomatic form.

> +    (inputs
> +     (list guile-lib guile-3.0 gettext-minimal))

Please sort lexicographically.

The rest LGTM.

-- 
Thanks,
Maxim