Subject: [bug#76359] [PATCH] gnu: supertuxkart: Split assets into separate package.

From: Ludovic Courtès <[email-masked]>
Date: Sat, 01 Mar 2025 15:35:13 +0100

Hi Eric,

Eric Bavier <[email-masked]> skribis:

> This allows smaller substitutes in case of updated dependencies.
>
> * gnu/packages/games.scm (%supertuxkart-version): New variable.
> (supertuxkart-source): Separate from supertuxkart in order to use in...
> (supertuxkart-data): ... this new package.
> (supertuxkart)[origin]: Use supertuxkart-source.
> [arguments]: Add configure-flags to embed reference to supertuxkart-data.
> [inputs]: Use new style.
>
> Change-Id: I7777574bf11fdc28047ad238468e5ec4094caeab

Overall LGTM.  One question:

> -       (uri (string-append "https://github.com/supertuxkart/stk-code/"
> -                           "releases/download/"
> -                           version "/SuperTuxKart-" version "-src.tar.xz"))

[...]

> +          (uri (svn-reference
> +                (url "https://svn.code.sf.net/p/supertuxkart/code/stk-assets")
> +                (revision (string->number commit))))

How come the assets are at sf.net, in an svn repo, when the rest is in
Git at github.com?

> +              #~(modify-phases %standard-phases
> +                  (add-after 'unpack 'copy-code-data
> +                    (lambda _
> +                      (copy-recursively
> +                       (string-append #$supertuxkart-source "/data/")
> +                       "."))))))

I’d suggest adding ‘supertuxkart-source’ to the ‘inputs’ field and, in
the phase above, do:

  (copy-recursively
    #$(this-package-input (git-file-name "supertuxkart" %supertuxkart-version))
    ".")

It’s more verbose, but more transparent: code the traverses the package
grafts “sees” this.

Ludo’.