lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updating GNU Guix's package definition for LilyPond


From: Jahrme Risner
Subject: Updating GNU Guix's package definition for LilyPond
Date: Tue, 17 Jan 2023 11:14:47 +0000

Hello all,

I recently moved my primary system onto GNU Guix and have been getting it set 
up according. While doing that I noticed that the Guix package for LilyPond is 
still on 2.20.0, seemingly having missed the entire 2.22.0 release cycle, and 
so I'm now looking at updating Guix's package definition for LilyPond so that 
users have the latest version. (Incidentally, thank you all for making the 
recent release happen!)

I have an in-progress package definition (see attached lilypond.scm) for 2.24.0 
that passed preliminary testing (I was able to process the attached minimal 
test.ly and produced the attached test.pdf), however it has revealed some 
complicating issues.

The current issue that I found is that the package definition needed to 
override the `out` environment variable by passing an empty `out=` variable to 
make (`#:make-flags #~(list "out=")`) in order to build LilyPond because:

1) Guix by default sets the environment variable `out` to the store path (see 
[0] for an explanation about the store if interested) that is being built for, 
essentially having the following as part of the build environment: `export 
out="/gnu/store/<hash>-lilypond-2.24.0"`

2) LilyPond takes the `out` environment variable and, if it exists, makes it 
part of the `outbase` variable in the make setup (see [1]). This resulted in 
having files like `out-/gnu/store/<hash>-lilypond-2.24.0/VERSION` where I would 
have expected a file like `out/VERSION` or `out-web/VERSION`. Interestingly, 
LilyPond does not seem to be internally consistent about this because the build 
failure was not just the result of having "weird" outputs, it was that some 
later steps that were trying to reference these outputs _without_ the store 
path inserted into the middle which caused the file access to fail.

To summarize, this essentially means that it's not possible to run the 
equivalent of a minimal `make && make install` when building using Guix's build 
system because of conflicting assumptions about what `out` should be set to. 
Initially I wondered whether this was an artifact of Guix sometimes doing 
things oddly but I couldn't find any other package in Guix's packages that was 
having to override the `out` environment variable. As such, this seems to 
suggest that it is actually Lilypond's handling of the `out` environment 
variable that is unexpected here.

While I'm still working on the final package definition (e.g., still necessary 
is patching out hard-coded references to `/bin/bash` in some of the Python 
scripts) I wanted to raise this finding so that I could hear what the LilyPond 
devel folks think.

Thank you all for all of the work that you do!

Best,
Jahrme

Links:
[0]: https://guix.gnu.org/manual/en/html_node/The-Store.html
[1]: 
https://gitlab.com/lilypond/lilypond/-/blob/69f9bf9948a23bac1dc026e82027ccffe72036e1/make/lilypond.make#L7-11

Attachment: test.ly
Description: Binary data

Attachment: lilypond.scm
Description: Binary data

Attachment: test.pdf
Description: Adobe PDF document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]