mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
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 }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
olpFont = a@{
|
||||
fontName,
|
||||
rev,
|
||||
sha256,
|
||||
version ? rev,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation (a // rec {
|
||||
|
||||
olpFont = { fontName, rev, sha256, version ? rev, ... }:
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
name = "openlilypond-font-${fontName}-${version}";
|
||||
pname = "openlilypond-font-${fontName}";
|
||||
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev sha256;
|
||||
owner = "OpenLilyPondFonts";
|
||||
repo = a.fontName;
|
||||
repo = fontName;
|
||||
};
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
for f in {otf,supplementary-fonts}/**.{o,t}tf; do
|
||||
install -Dt $out/otf -m755 $f
|
||||
local fontsdir="$out/share/lilypond/${lilypond.version}/fonts"
|
||||
|
||||
install -m755 -d "$fontsdir/otf"
|
||||
for font in {otf,supplementary-fonts}/**.{o,t}tf; do
|
||||
install -Dt "$fontsdir/otf" -m755 "$font"
|
||||
done
|
||||
|
||||
for f in svg/**.{svg,woff}; do
|
||||
install -Dt $out/svg -m755 $f
|
||||
install -m755 -d "$fontsdir/svg"
|
||||
for font in svg/**.{svg,woff}; do
|
||||
install -Dt "$fontsdir/svg" -m755 "$font"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
inherit (src.meta) homepage;
|
||||
inherit (lilypond.meta) platforms;
|
||||
description = "${fontName} font for LilyPond";
|
||||
license = a.license or licenses.ofl;
|
||||
platforms = lilypond.meta.platforms;
|
||||
maintainers = (a.meta.maintainers or []) ++ [ maintainers.yurrriq ];
|
||||
license = licenses.ofl;
|
||||
maintainers = with maintainers; [ yurrriq ];
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
|
@ -4,28 +4,15 @@
|
||||
}:
|
||||
|
||||
stdenv.lib.appendToName "with-fonts" (symlinkJoin {
|
||||
inherit (lilypond) name version;
|
||||
inherit (lilypond) meta name version ;
|
||||
|
||||
paths = [ lilypond ];
|
||||
|
||||
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: ''
|
||||
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
|
||||
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 { };
|
||||
|
||||
lilypond = callPackage ../misc/lilypond { guile = guile_1_8; };
|
||||
|
||||
lilypond-unstable = callPackage ../misc/lilypond/unstable.nix { };
|
||||
|
||||
lilypond-with-fonts = callPackage ../misc/lilypond/with-fonts.nix {
|
||||
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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user