[PATCH] gnu: Add ultrastar-deluxe.

  • Done
  • quality assurance status badge
Details
5 participants
  • Jonathan Brielmaier
  • Lars-Dominik Braun
  • Ludovic Courtès
  • Maxime Devos
  • (
Owner
unassigned
Submitted by
Lars-Dominik Braun
Severity
normal
L
L
Lars-Dominik Braun wrote on 16 Sep 2022 15:37
(address . guix-patches@gnu.org)
YyR8FQG8AmOMpy5e@noor.fritz.box
Attachment: file
M
M
Maxime Devos wrote on 18 Sep 2022 11:39
f5182a66-2771-50da-3baa-a11ccf7aced6@telenet.be
On 16-09-2022 15:37, Lars-Dominik Braun wrote:
Toggle quote (7 lines)
> + " -lSDL2_image -ldl "
> + "-lz -lfreetype -lportaudio -lavcodec "
> + "-lavformat -lavutil -lswresample "
> + "-lswscale -llua -ldl -lX11 -lportmidi "
> + "-L" #$zlib "/lib "
> + "-L" #$libx11 "/lib "
> + "-L" #$portmidi "/lib ")))))
To make --with-input transformations work, these #$foo need to be
replaced by #$(this-package-input "zlib"). To avoid input labels,
you can replace #$zlib "/lib" by
(dirname (search-input-file inputs "lib/libz.so")).
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 18 Sep 2022 14:26
3df5294c-5cc7-09f2-9410-48cb8ab0e2ec@telenet.be
On 16-09-2022 15:37, Lars-Dominik Braun wrote:
Toggle quote (7 lines)
> + " -lSDL2_image -ldl "
> + "-lz -lfreetype -lportaudio -lavcodec "
> + "-lavformat -lavutil -lswresample "
> + "-lswscale -llua -ldl -lX11 -lportmidi "
> + "-L" #$zlib "/lib "
> + "-L" #$libx11 "/lib "
> + "-L" #$portmidi "/lib ")))))
To make --with-input transformations work, these #$foo need to be
replaced by #$(this-package-input "zlib"). To avoid input labels,
you can replace #$zlib "/lib" by
(dirname (search-input-file inputs "lib/libz.so")).
Greetings,
Maxime.
Attachment: OpenPGP_signature
L
L
Lars-Dominik Braun wrote on 21 Sep 2022 13:52
[bug#57861] [PATCH v2] gnu: Add ultrastar-deluxe.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 57861@debbugs.gnu.org)
Yyr67L9d78IDtOTK@noor.fritz.box
Attachment: file
L
L
Ludovic Courtès wrote on 17 Oct 2022 10:33
Re: bug#57861: [PATCH] gnu: Add ultrastar-deluxe.
(name . Lars-Dominik Braun)(address . lars@6xq.net)
87lepehmsw.fsf_-_@gnu.org
Hello!

Lars-Dominik Braun <lars@6xq.net> skribis:

Toggle quote (5 lines)
> +;; Lazily resolve to avoid a circular dependency.
> +(define fpc*
> + (delay (module-ref (resolve-interface '(gnu packages pascal))
> + 'fpc)))

I think this is unnecessary: you can just #:use-module (gnu packages
pascal) and have ‘fpc’ in ‘native-inputs’. Everything will be fine
because ‘inputs’ is a thunked field (IOW, its evaluation is delayed).

Apart from that LGTM!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 17 Oct 2022 10:35
(name . Lars-Dominik Braun)(address . lars@6xq.net)
87k04yhmq3.fsf_-_@gnu.org
Hello!

Lars-Dominik Braun <lars@6xq.net> skribis:

Toggle quote (5 lines)
> +;; Lazily resolve to avoid a circular dependency.
> +(define fpc*
> + (delay (module-ref (resolve-interface '(gnu packages pascal))
> + 'fpc)))

I think this is unnecessary: you can just #:use-module (gnu packages
pascal) and have ‘fpc’ in ‘native-inputs’. Everything will be fine
because ‘inputs’ is a thunked field (IOW, its evaluation is delayed).

Apart from that LGTM!

Thanks,
Ludo’.
M
M
Maxime Devos wrote on 17 Oct 2022 15:25
(address . 57861@debbugs.gnu.org)
4cdb853b-accb-02a5-5f39-e14994dfcb8d@telenet.be
On 17-10-2022 10:33, Ludovic Courtès wrote:
Toggle quote (12 lines)
> Hello!
>
> Lars-Dominik Braun <lars@6xq.net> skribis:
>
>> +;; Lazily resolve to avoid a circular dependency.
>> +(define fpc*
>> + (delay (module-ref (resolve-interface '(gnu packages pascal))
>> + 'fpc)))
>
> I think this is unnecessary: you can just #:use-module (gnu packages
> pascal) and have ‘fpc’ in ‘native-inputs’. Everything will be fine
> because ‘inputs’ is a thunked field (IOW, its evaluation is delayed).
That's still a circular dependency. Why import (gnu packages pascal)
when you don't need it (e.g. when installing another, non-pascal,
package)? There is some bug report on the excessive dependencies among
Guix modules with some proposed solutions.
Greetings,
Maxime.
Attachment: OpenPGP_signature
(
Re: [bug#57861] [PATCH] gnu: Add ultrastar-deluxe.
(address . 57861@debbugs.gnu.org)
CNO8FR0URQ5P.3TYKUWGCL0Y5I@guix-framework
On Mon Oct 17, 2022 at 2:25 PM BST, Maxime Devos wrote:
Toggle quote (5 lines)
> That's still a circular dependency. Why import (gnu packages pascal)
> when you don't need it (e.g. when installing another, non-pascal,
> package)? There is some bug report on the excessive dependencies among
> Guix modules with some proposed solutions.

Wouldn't using #:autoload be a cleaner way that still lazily resolves the variables?

-- (
M
M
Maxime Devos wrote on 17 Oct 2022 15:37
(address . 57861@debbugs.gnu.org)
2d9e70a3-a51a-e541-c2b9-07b7ba7c7ed1@telenet.be
On 17-10-2022 15:28, ( wrote:
Toggle quote (9 lines)
> On Mon Oct 17, 2022 at 2:25 PM BST, Maxime Devos wrote:
>> That's still a circular dependency. Why import (gnu packages pascal)
>> when you don't need it (e.g. when installing another, non-pascal,
>> package)? There is some bug report on the excessive dependencies among
>> Guix modules with some proposed solutions.
>
> Wouldn't using #:autoload be a cleaner way that still lazily resolves the variables?
>
> -- (
Possibly, I proposed this in
https://issues.guix.gnu.org/54539#62 for a few package modules, with a
relatively small but noticable improvement (presumably it would be more
improved by doing it for all package modules instead of only a selection
and presumably it would be more noticable on a spinning disk instead of
an SSD).
Greetings,
Maxime.
Attachment: OpenPGP_signature
L
L
Ludovic Courtès wrote on 17 Oct 2022 18:44
Re: bug#57861: [PATCH] gnu: Add ultrastar-deluxe.
(name . Maxime Devos)(address . maximedevos@telenet.be)
87ilkipfh6.fsf@gnu.org
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (15 lines)
> On 17-10-2022 10:33, Ludovic Courtès wrote:
>> Hello!
>> Lars-Dominik Braun <lars@6xq.net> skribis:
>>
>>> +;; Lazily resolve to avoid a circular dependency.
>>> +(define fpc*
>>> + (delay (module-ref (resolve-interface '(gnu packages pascal))
>>> + 'fpc)))
>> I think this is unnecessary: you can just #:use-module (gnu packages
>> pascal) and have ‘fpc’ in ‘native-inputs’. Everything will be fine
>> because ‘inputs’ is a thunked field (IOW, its evaluation is delayed).
>
> That's still a circular dependency. Why import (gnu packages pascal)
> when you don't need it

That’s what every package module does.

We can discuss the drawbacks of this and ways to avoid it, but this
particular patch and review is not the right place to do that IMO.

Thanks,
Ludo’.
M
M
Maxime Devos wrote on 17 Oct 2022 19:26
(name . Ludovic Courtès)(address . ludo@gnu.org)
98c705f2-a8f7-3c0a-b7ac-7fde68defb12@telenet.be
On 17-10-2022 18:44, Ludovic Courtès wrote:
Toggle quote (9 lines)
> Maxime Devos <maximedevos@telenet.be> skribis:
>[...]
>> That's still a circular dependency. Why import (gnu packages pascal)
>> when you don't need it
>
> That’s what every package module does.
>
> We can discuss the drawbacks of this and ways to avoid it, but this
> particular patch and review is not the right place to do that IMO.
I tried to do that, in https://issues.guix.gnu.org/54539,but there were
no further responses.
Greetings,
Maxime.
Attachment: OpenPGP_signature
L
L
Lars-Dominik Braun wrote on 18 Oct 2022 09:56
(name . Ludovic Courtès)(address . ludo@gnu.org)
Y05cJkuQCNiMlToz@noor.fritz.box
Hi Ludo and Maxim,

Toggle quote (3 lines)
> I think this is unnecessary: you can just #:use-module (gnu packages
> pascal) and have ‘fpc’ in ‘native-inputs’. Everything will be fine
> because ‘inputs’ is a thunked field (IOW, its evaluation is delayed).
the problem is that `make` fails with an error in that case. For me it’s

ice-9/eval.scm:293:34: error: gash: unbound variable
hint: Did you forget a `use-modules' form?

but YMMV. With #:autoload `make` succeeds, but throws similar
errors/warnings(?) in the process:

;;; Failed to autoload fpc in (gnu packages pascal):
;;; Throw to key `unbound-variable' with args `("resolve-interface" "no binding `~A' in module ~A" (fpc (gnu packages pascal)) #f)'.

That’s why I went for the route implemented in the initial patch. What
do we do now?

Lars
M
M
Maxime Devos wrote on 18 Oct 2022 14:44
(address . 57861@debbugs.gnu.org)
809300ae-6aee-7b0b-115c-49ee030ea030@telenet.be
On 18-10-2022 09:56, Lars-Dominik Braun wrote:
Toggle quote (11 lines)
> [...]
> the problem is that `make` fails with an error in that case. For me it’s
>
> ice-9/eval.scm:293:34: error: gash: unbound variable
> hint: Did you forget a `use-modules' form?
>
> but YMMV. With #:autoload `make` succeeds, but throws similar
> errors/warnings(?) in the process:
>
> ;;; Failed to autoload fpc in (gnu packages pascal):
> ;;; Throw to key `unbound-variable' with args `("resolve-interface" "no binding `~A' in module ~A" (fpc (gnu packages pascal)) #f)'
Don't know what's up with that, maybe when compiling (gnu packages
pascal) is imported anyway because 'fpc' might be a macro?
But if I try that in a REPL:
(define-module (foo) #:autoload (bar) ( baz))
;;; Failed to determine exported bindings from module (bar):
;;; no code for module (bar)
;;; Failed to determine exported bindings from module (bar):
;;; no code for module (bar)
$1 = #<directory (foo) 7f31caf71820>
I get other messages (warnings, in this case), so maybe an incorrect
hypothesis.
Toggle quote (3 lines)
>
> That’s why I went for the route implemented in the initial patch. What
> do we do now?
I think the issue is that (gnu packages pascal) imports (gnu packages
commencement), even though according to the comment in (gnu packages
commencement), you aren't supposed to do that (because of cycles).
You could give doing the resolve-module trick in (gnu packages pascal) a
try.
Greetings,
Maxime
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 18 Oct 2022 14:49
(address . 57861@debbugs.gnu.org)
f961fa85-78ac-e837-7590-4c341d27e4e3@telenet.be
(To add to my previous reply):
It appears that other package modules may need a similar change,
according to a "git grep -F":
gnu/packages/engineering.scm: #:use-module (gnu packages commencement)
gnu/packages/instrumentation.scm: #:use-module (gnu packages commencement)
gnu/packages/pascal.scm: #:use-module (gnu packages commencement)
gnu/packages/raspberry-pi.scm: #:use-module (gnu packages commencement)
Alternatively, importing commencement could be accepted though the
indirect dependency on 'games' from 'commencement' may need to be broken
to resolve the error (?) message, as done in
I don't remember if (gnu packages games) was one of the modules that was
removed from the dependencies, though, and I'm not sure if this change
would resolve things here.
Greetings,
Maxime.
Attachment: OpenPGP_signature
L
L
Lars-Dominik Braun wrote on 19 Oct 2022 13:09
Re: bug#57861: [PATCH v2] gnu: Add ultrastar-deluxe.
(name . Maxime Devos)(address . maximedevos@telenet.be)
Y0/a0mB8gW4xb9o/@noor.fritz.box
Hi Maxime,

Toggle quote (2 lines)
> You could give doing the resolve-module trick in (gnu packages pascal) a
> try.
or just #:autoload? The attached v2 seems to work at least.

Lars
From 14ef2dcce25c47f05d8319edbcaf5de7b634bb39 Mon Sep 17 00:00:00 2001
From: Lars-Dominik Braun <lars@6xq.net>
Date: Wed, 19 Oct 2022 13:04:18 +0200
Subject: [PATCH v2 1/2] gnu: fpc: Autoload ld-wrapper.

* gnu/packages/pascal.scm: Use #:autoload for ld-wrapper.
---
gnu/packages/pascal.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/pascal.scm b/gnu/packages/pascal.scm
index af7857f084..6749488f3f 100644
--- a/gnu/packages/pascal.scm
+++ b/gnu/packages/pascal.scm
@@ -28,7 +28,7 @@ (define-module (gnu packages pascal)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
- #:use-module (gnu packages commencement)
+ #:autoload (gnu packages commencement) (ld-wrapper)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages ncurses)
--
2.37.3
J
J
Jonathan Brielmaier wrote on 7 Nov 2022 22:41
[PATCH] gnu: Add ultrastar-deluxe.
(address . 57861@debbugs.gnu.org)
320ceb0d-2d9a-8a00-210b-8cd935980145@web.de
Thanks Lars for the patch.

I checked the latest version of the patch series out and
ultrastar-deluxe runs fine.
Even with my rather big (2000 songs) library.
L
L
Ludovic Courtès wrote on 7 Nov 2022 23:59
(name . Lars-Dominik Braun)(address . lars@6xq.net)
87cz9ys74i.fsf_-_@gnu.org
Hi,

Lars-Dominik Braun <lars@6xq.net> skribis:

Toggle quote (9 lines)
>>From c542fd020cbf69fa319ea13301b80eedd35f34a3 Mon Sep 17 00:00:00 2001
> From: Lars-Dominik Braun <lars@6xq.net>
> Date: Wed, 19 Oct 2022 13:05:25 +0200
> Subject: [PATCH v2 2/2] gnu: Add ultrastar-deluxe.
>
> * gnu/packages/games.scm (ultrastar-deluxe): New variable.
> * gnu/packages/patches/ultrastar-deluxe-no-freesans.patch: New file.
> * gnu/local.mk: Add it.

Applied on your behalf.

Turns out pascal.scm didn’t need to include (gnu packages
commencement) so I did that first.

Next step is a fix for https://issues.guix.gnu.org/55968, which
affects this package too…

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 57861@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57861
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch