mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
lilypond-with-fonts: rework
- Use symlinkJoin - Cleanup quoting - Inherit meta and version from lilypond
This commit is contained in:
parent
54e8c67375
commit
859db73260
@ -1,35 +1,31 @@
|
|||||||
{ stdenv
|
{ stdenv, lndir, symlinkJoin, makeWrapper
|
||||||
, lndir
|
, lilypond, openlilylib-fonts
|
||||||
, lilypond
|
|
||||||
, openlilylib-fonts
|
|
||||||
, fonts ? openlilylib-fonts.all
|
, fonts ? openlilylib-fonts.all
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.lib.appendToName "with-fonts" (stdenv.mkDerivation {
|
stdenv.lib.appendToName "with-fonts" (symlinkJoin {
|
||||||
inherit (lilypond) name;
|
inherit (lilypond) name version;
|
||||||
phases = "installPhase";
|
|
||||||
buildInputs = fonts;
|
|
||||||
nativeBuildInputs = [ lndir ];
|
|
||||||
installPhase = ''
|
|
||||||
local fontsdir=$out/share/lilypond/${lilypond.version}/fonts
|
|
||||||
|
|
||||||
install -m755 -d $fontsdir/otf
|
paths = [ lilypond ];
|
||||||
install -m755 -d $fontsdir/svg
|
|
||||||
|
buildInputs = [ makeWrapper lndir ];
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
local datadir="$out/share/lilypond/${lilypond.version}"
|
||||||
|
local fontsdir="$datadir/fonts"
|
||||||
|
|
||||||
|
install -m755 -d "$fontsdir/otf"
|
||||||
|
install -m755 -d "$fontsdir/svg"
|
||||||
|
|
||||||
${stdenv.lib.concatMapStrings (font: ''
|
${stdenv.lib.concatMapStrings (font: ''
|
||||||
lndir -silent ${font}/otf $fontsdir/otf
|
lndir -silent "${font}/otf" "$fontsdir/otf"
|
||||||
lndir -silent ${font}/svg $fontsdir/svg
|
lndir -silent "${font}/svg" "$fontsdir/svg"
|
||||||
'') fonts}
|
'') 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
|
for p in $out/bin/*; do
|
||||||
substituteInPlace $p --replace "exec -a \"${lilypond}" "exec -a \"$out"
|
wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
inherit (lilypond) meta;
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user