[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Updating GNU Guix's package definition for LilyPond
From: |
Jean Abou Samra |
Subject: |
Re: Updating GNU Guix's package definition for LilyPond |
Date: |
Tue, 17 Jan 2023 15:01:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 |
Hi Jahrme,
Le 17/01/2023 à 12:14, Jahrme Risner a écrit :
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,
Given that one of LilyPond's creators now works on Guix, I actually find
this a bit surprising...
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.
`out` is not a standard environment variable. LilyPond's build system
makes extensive use of it, and it seems that Guix happens to have
chosen the same name for something else. It's just an unfortunate name
collision, AFAICS.
In your shoes, I'd just live with "out=".
Best,
Jean
OpenPGP_signature
Description: OpenPGP digital signature