New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lilypond: add openlilylib-fonts and lilypond-with-fonts #23548
lilypond: add openlilylib-fonts and lilypond-with-fonts #23548
Conversation
pkgs/misc/lilypond/fonts.nix
Outdated
in | ||
|
||
{ | ||
beethoven = olpFont { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assembled this mostly manually. It should probably be scripted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably ok for the moment.
install -m755 -Dt $out/bin ${lilypond}/bin/* | ||
|
||
for p in $out/bin/*; do | ||
substituteInPlace $p --replace "exec -a ${lilypond}" "exec -a $out" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but feels very hackish. The lilypond
binary seems to look for fonts in ../share/lilypond/${lilypond.version}/fonts
so simply symlinking the original, doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I currently do not see a different solution.
/cc @puffnfresh @Mic92 |
pkgs/misc/lilypond/with-fonts.nix
Outdated
@@ -0,0 +1,28 @@ | |||
{ stdenv, lilypond, lndir }: fonts: stdenv.mkDerivation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be the default value just use all OpenLilyPondFonts? Some people just want to get something working without having to override a package. Maybe an all
attribute containing a list of all fonts.
Add a list of all fonts to openlilylib-fonts and use that as the default fonts argument to lilypond-with-fonts.
Thanks! |
Motivation for this change
I want to use some custom music fonts, which LilyPond supports but needs for them to be in a particular location.
Notes
I feel like the code I've written is a bit sloppy and I'm very open to suggestions.
Example:
Edit:
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)