openlilylib-fonts: rework
- Install to lilypond fonts dir - Use lilypond-unstable by default
This commit is contained in:
parent
d013602d78
commit
900be27403
|
@ -1,45 +1,43 @@
|
||||||
{ stdenv, fetchFromGitHub, lilypond }:
|
{ stdenv, fetchFromGitHub, lilypond }:
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
olpFont = a@{
|
|
||||||
fontName,
|
olpFont = { fontName, rev, sha256, version ? rev, ... }:
|
||||||
rev,
|
stdenv.mkDerivation {
|
||||||
sha256,
|
|
||||||
version ? rev,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation (a // rec {
|
|
||||||
inherit version;
|
inherit version;
|
||||||
name = "openlilypond-font-${fontName}-${version}";
|
pname = "openlilypond-font-${fontName}";
|
||||||
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
inherit rev sha256;
|
inherit rev sha256;
|
||||||
owner = "OpenLilyPondFonts";
|
owner = "OpenLilyPondFonts";
|
||||||
repo = a.fontName;
|
repo = fontName;
|
||||||
};
|
};
|
||||||
|
|
||||||
phases = [ "unpackPhase" "installPhase" ];
|
phases = [ "unpackPhase" "installPhase" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
for f in {otf,supplementary-fonts}/**.{o,t}tf; do
|
local fontsdir="$out/share/lilypond/${lilypond.version}/fonts"
|
||||||
install -Dt $out/otf -m755 $f
|
|
||||||
|
install -m755 -d "$fontsdir/otf"
|
||||||
|
for font in {otf,supplementary-fonts}/**.{o,t}tf; do
|
||||||
|
install -Dt "$fontsdir/otf" -m755 "$font"
|
||||||
done
|
done
|
||||||
|
|
||||||
for f in svg/**.{svg,woff}; do
|
install -m755 -d "$fontsdir/svg"
|
||||||
install -Dt $out/svg -m755 $f
|
for font in svg/**.{svg,woff}; do
|
||||||
|
install -Dt "$fontsdir/svg" -m755 "$font"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
inherit (src.meta) homepage;
|
inherit (src.meta) homepage;
|
||||||
|
inherit (lilypond.meta) platforms;
|
||||||
description = "${fontName} font for LilyPond";
|
description = "${fontName} font for LilyPond";
|
||||||
license = a.license or licenses.ofl;
|
license = licenses.ofl;
|
||||||
platforms = lilypond.meta.platforms;
|
maintainers = with maintainers; [ yurrriq ];
|
||||||
maintainers = (a.meta.maintainers or []) ++ [ maintainers.yurrriq ];
|
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
@ -4,28 +4,15 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.lib.appendToName "with-fonts" (symlinkJoin {
|
stdenv.lib.appendToName "with-fonts" (symlinkJoin {
|
||||||
inherit (lilypond) name version;
|
inherit (lilypond) meta name version ;
|
||||||
|
|
||||||
paths = [ lilypond ];
|
paths = [ lilypond ];
|
||||||
|
|
||||||
buildInputs = [ makeWrapper lndir ];
|
buildInputs = [ makeWrapper lndir ];
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
local datadir="$out/share/lilypond/${lilypond.version}"
|
for p in $out/bin/*; do
|
||||||
local fontsdir="$datadir/fonts"
|
wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
|
||||||
|
done
|
||||||
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}
|
|
||||||
|
|
||||||
for p in $out/bin/*; do
|
|
||||||
wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
|
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inherit (lilypond) meta;
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -23320,12 +23320,16 @@ in
|
||||||
lguf-brightness = callPackage ../misc/lguf-brightness { };
|
lguf-brightness = callPackage ../misc/lguf-brightness { };
|
||||||
|
|
||||||
lilypond = callPackage ../misc/lilypond { guile = guile_1_8; };
|
lilypond = callPackage ../misc/lilypond { guile = guile_1_8; };
|
||||||
|
|
||||||
lilypond-unstable = callPackage ../misc/lilypond/unstable.nix { };
|
lilypond-unstable = callPackage ../misc/lilypond/unstable.nix { };
|
||||||
|
|
||||||
lilypond-with-fonts = callPackage ../misc/lilypond/with-fonts.nix {
|
lilypond-with-fonts = callPackage ../misc/lilypond/with-fonts.nix {
|
||||||
lilypond = lilypond-unstable;
|
lilypond = lilypond-unstable;
|
||||||
};
|
};
|
||||||
|
|
||||||
openlilylib-fonts = callPackage ../misc/lilypond/fonts.nix { };
|
openlilylib-fonts = callPackage ../misc/lilypond/fonts.nix {
|
||||||
|
lilypond = lilypond-unstable;
|
||||||
|
};
|
||||||
|
|
||||||
loop = callPackage ../tools/misc/loop { };
|
loop = callPackage ../tools/misc/loop { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue