lilypond-with-fonts: fix lilypond not finding its libraries

Fixes #140152. The fix is inspired by how lilypond-with-fonts was
packaged in v18.09.
This commit is contained in:
Omid Momenzadeh 2021-10-04 13:23:52 +03:30 committed by Eric Bailey
parent 0c416075ae
commit c205944161

View File

@ -1,4 +1,4 @@
{ lib, lndir, symlinkJoin, makeWrapper
{ lib, symlinkJoin, makeWrapper
, lilypond, openlilylib-fonts
}:
@ -8,11 +8,10 @@ lib.appendToName "with-fonts" (symlinkJoin {
paths = [ lilypond ] ++ openlilylib-fonts.all;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ lndir ];
postBuild = ''
for p in $out/bin/*; do
wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
wrapProgram "$p" --set LILYPOND_DATADIR "$out/share/lilypond/${lilypond.version}"
done
'';
})