Merge pull request #62937 from yurrriq/update/lilypond

Update lilypond*
This commit is contained in:
Michael Raskin 2019-06-11 08:12:12 +00:00 committed by GitHub
commit a3e2cb2a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 86 deletions

View File

@ -1,26 +1,26 @@
{ stdenv, fetchurl, ghostscript, texinfo, imagemagick, texi2html, guile { stdenv, fetchgit, ghostscript, texinfo, imagemagick, texi2html, guile
, python2, gettext, flex, perl, bison, pkgconfig, autoreconfHook, dblatex , python2, gettext, flex, perl, bison, pkgconfig, autoreconfHook, dblatex
, fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff , fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
, fetchsvn, makeWrapper, t1utils , makeWrapper, t1utils
, texlive, tex ? texlive.combine { , texlive, tex ? texlive.combine {
inherit (texlive) scheme-small lh metafont epsf; inherit (texlive) scheme-small lh metafont epsf;
} }
}: }:
stdenv.mkDerivation rec{ let
majorVersion="2.18";
minorVersion="2";
version="${majorVersion}.${minorVersion}";
name = "lilypond-${version}";
urwfonts = fetchsvn { version = "2.18.2";
url = "http://svn.ghostscript.com/ghostscript/tags/urw-fonts-1.0.7pre44";
sha256 = "0al5vdsb66db6yzwi0qgs1dnd1i1fb77cigdjxg8zxhhwf6hhwpn";
};
src = fetchurl { in
url = "http://download.linuxaudio.org/lilypond/sources/v${majorVersion}/lilypond-${version}.tar.gz";
sha256 = "01xs9x2wjj7w9appaaqdhk15r1xvvdbz9qwahzhppfmhclvp779j"; stdenv.mkDerivation {
pname = "lilypond";
inherit version;
src = fetchgit {
url = "https://git.savannah.gnu.org/r/lilypond.git";
rev = "release/${version}-1";
sha256 = "0fk045fmmb6fcv7jdvkbqr04qlwnxzwclr2gzx3gja714xy6a76x";
}; };
postInstall = '' postInstall = ''
@ -33,7 +33,10 @@ stdenv.mkDerivation rec{
done done
''; '';
configureFlags = [ "--disable-documentation" "--with-ncsb-dir=${urwfonts}"]; configureFlags = [
"--disable-documentation"
"--with-ncsb-dir=${ghostscript}/share/ghostscript/fonts"
];
preConfigure = '' preConfigure = ''
sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl
@ -56,8 +59,9 @@ stdenv.mkDerivation rec{
description = "Music typesetting system"; description = "Music typesetting system";
homepage = http://lilypond.org/; homepage = http://lilypond.org/;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = [ maintainers.marcweber ]; maintainers = with maintainers; [ marcweber yurrriq ];
platforms = platforms.all; platforms = platforms.all;
broken = stdenv.isDarwin;
}; };
patches = [ ./findlib.patch ]; patches = [ ./findlib.patch ];

View File

@ -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
@ -86,8 +84,8 @@ rec {
}; };
lilyjazz = olpFont { lilyjazz = olpFont {
fontName = "lilyjazz"; fontName = "lilyjazz";
rev = "8f1f2dd"; rev = "8fa7d554";
sha256 = "0k44dl5hfcn7wn2b6c51mbw6hsb1sprmx95xiabvcbpxnkplbmac"; sha256 = "1z7px7k2sn7snnj7yfjv0p9axwbn452vn9ww9icmb1249b0d1qry";
}; };
lv-goldenage = olpFont { lv-goldenage = olpFont {
fontName = "lv-goldenage"; fontName = "lv-goldenage";

View File

@ -1,26 +1,23 @@
{ stdenv, fetchurl, fetchgit, rsync, lilypond, gyre-fonts }: { stdenv, fetchgit, lilypond, ghostscript, gyre-fonts }:
with stdenv.lib; let
let urw-fonts = fetchgit { version = "2.19.83";
url = "http://git.ghostscript.com/urw-core35-fonts.git";
rev = "1f28a6fcd2176256a995db907d9ffe6e1b9b83e9";
sha256 = "1nlx95l1pw5lxqp2v0rn9a7lqrsbbhzr0dy3cybk55r4a8awbr2a";
}; in
overrideDerivation lilypond (p: rec { in
majorVersion = "2.19";
minorVersion = "65";
version="${majorVersion}.${minorVersion}";
name = "lilypond-${version}";
src = fetchurl { lilypond.overrideAttrs (oldAttrs: {
url = "http://download.linuxaudio.org/lilypond/sources/v${majorVersion}/lilypond-${version}.tar.gz"; inherit version;
sha256 = "0k2jy7z58j62c5cv1308ac62d6jri17wip76xrbq8s6jq6jl7phd";
src = fetchgit {
url = "https://git.savannah.gnu.org/r/lilypond.git";
rev = "release/${version}-1";
sha256 = "1ycyx9x76d79jh7wlwyyhdjkyrwnhzqpw006xn2fk35s0jrm2iz0";
}; };
configureFlags = [ "--disable-documentation" "--with-urwotf-dir=${urw-fonts}" "--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"]; configureFlags = [
"--disable-documentation"
buildInputs = p.buildInputs ++ [ rsync ]; "--with-urwotf-dir=${ghostscript}/share/ghostscript/fonts"
"--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
];
}) })

View File

@ -1,35 +1,18 @@
{ 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) meta 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
${stdenv.lib.concatMapStrings (font: '' buildInputs = [ makeWrapper lndir ];
lndir -silent ${font}/otf $fontsdir/otf
lndir -silent ${font}/svg $fontsdir/svg
'') fonts}
install -m755 -d $out/lib postBuild = ''
lndir -silent ${lilypond}/lib $out/lib for p in $out/bin/*; do
install -m755 -d $out/share wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
lndir -silent ${lilypond}/share $out/share done
install -m755 -Dt $out/bin ${lilypond}/bin/*
for p in $out/bin/*; do
substituteInPlace $p --replace "exec -a \"${lilypond}" "exec -a \"$out"
done
''; '';
}) })

View File

@ -23323,12 +23323,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 { };