mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
f497421e14
Add a list of all fonts to openlilylib-fonts and use that as the default fonts argument to lilypond-with-fonts.
36 lines
882 B
Nix
36 lines
882 B
Nix
{ stdenv
|
|
, lndir
|
|
, lilypond
|
|
, openlilylib-fonts
|
|
, fonts ? openlilylib-fonts.all
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "${lilypond.name}-with-fonts";
|
|
phases = "installPhase";
|
|
buildInputs = fonts;
|
|
nativeBuildInputs = [ lndir ];
|
|
installPhase = ''
|
|
local fontsdir=$out/share/lilypond/${lilypond.version}/fonts
|
|
|
|
install -m755 -d $fontsdir/otf
|
|
install -m755 -d $fontsdir/svg
|
|
|
|
${stdenv.lib.concatMapStrings (font: ''
|
|
lndir -silent ${font}/otf $fontsdir/otf
|
|
lndir -silent ${font}/svg $fontsdir/svg
|
|
'') fonts}
|
|
|
|
install -m755 -d $out/lib
|
|
lndir -silent ${lilypond}/lib $out/lib
|
|
install -m755 -d $out/share
|
|
lndir -silent ${lilypond}/share $out/share
|
|
|
|
install -m755 -Dt $out/bin ${lilypond}/bin/*
|
|
|
|
for p in $out/bin/*; do
|
|
substituteInPlace $p --replace "exec -a ${lilypond}" "exec -a $out"
|
|
done
|
|
'';
|
|
}
|