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
, fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
, fetchsvn, makeWrapper, t1utils
, makeWrapper, t1utils
, texlive, tex ? texlive.combine {
inherit (texlive) scheme-small lh metafont epsf;
}
}:
stdenv.mkDerivation rec{
majorVersion="2.18";
minorVersion="2";
version="${majorVersion}.${minorVersion}";
name = "lilypond-${version}";
let
urwfonts = fetchsvn {
url = "http://svn.ghostscript.com/ghostscript/tags/urw-fonts-1.0.7pre44";
sha256 = "0al5vdsb66db6yzwi0qgs1dnd1i1fb77cigdjxg8zxhhwf6hhwpn";
};
version = "2.18.2";
src = fetchurl {
url = "http://download.linuxaudio.org/lilypond/sources/v${majorVersion}/lilypond-${version}.tar.gz";
sha256 = "01xs9x2wjj7w9appaaqdhk15r1xvvdbz9qwahzhppfmhclvp779j";
in
stdenv.mkDerivation {
pname = "lilypond";
inherit version;
src = fetchgit {
url = "https://git.savannah.gnu.org/r/lilypond.git";
rev = "release/${version}-1";
sha256 = "0fk045fmmb6fcv7jdvkbqr04qlwnxzwclr2gzx3gja714xy6a76x";
};
postInstall = ''
@ -33,7 +33,10 @@ stdenv.mkDerivation rec{
done
'';
configureFlags = [ "--disable-documentation" "--with-ncsb-dir=${urwfonts}"];
configureFlags = [
"--disable-documentation"
"--with-ncsb-dir=${ghostscript}/share/ghostscript/fonts"
];
preConfigure = ''
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";
homepage = http://lilypond.org/;
license = licenses.gpl3;
maintainers = [ maintainers.marcweber ];
maintainers = with maintainers; [ marcweber yurrriq ];
platforms = platforms.all;
broken = stdenv.isDarwin;
};
patches = [ ./findlib.patch ];

View File

@ -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
@ -86,8 +84,8 @@ rec {
};
lilyjazz = olpFont {
fontName = "lilyjazz";
rev = "8f1f2dd";
sha256 = "0k44dl5hfcn7wn2b6c51mbw6hsb1sprmx95xiabvcbpxnkplbmac";
rev = "8fa7d554";
sha256 = "1z7px7k2sn7snnj7yfjv0p9axwbn452vn9ww9icmb1249b0d1qry";
};
lv-goldenage = olpFont {
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 {
url = "http://git.ghostscript.com/urw-core35-fonts.git";
rev = "1f28a6fcd2176256a995db907d9ffe6e1b9b83e9";
sha256 = "1nlx95l1pw5lxqp2v0rn9a7lqrsbbhzr0dy3cybk55r4a8awbr2a";
}; in
version = "2.19.83";
overrideDerivation lilypond (p: rec {
majorVersion = "2.19";
minorVersion = "65";
version="${majorVersion}.${minorVersion}";
name = "lilypond-${version}";
in
src = fetchurl {
url = "http://download.linuxaudio.org/lilypond/sources/v${majorVersion}/lilypond-${version}.tar.gz";
sha256 = "0k2jy7z58j62c5cv1308ac62d6jri17wip76xrbq8s6jq6jl7phd";
lilypond.overrideAttrs (oldAttrs: {
inherit version;
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/"];
buildInputs = p.buildInputs ++ [ rsync ];
configureFlags = [
"--disable-documentation"
"--with-urwotf-dir=${ghostscript}/share/ghostscript/fonts"
"--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
];
})

View File

@ -1,35 +1,18 @@
{ stdenv
, lndir
, lilypond
, openlilylib-fonts
{ stdenv, lndir, symlinkJoin, makeWrapper
, lilypond, openlilylib-fonts
, fonts ? openlilylib-fonts.all
}:
stdenv.lib.appendToName "with-fonts" (stdenv.mkDerivation {
inherit (lilypond) name;
phases = "installPhase";
buildInputs = fonts;
nativeBuildInputs = [ lndir ];
installPhase = ''
local fontsdir=$out/share/lilypond/${lilypond.version}/fonts
stdenv.lib.appendToName "with-fonts" (symlinkJoin {
inherit (lilypond) meta name version ;
install -m755 -d $fontsdir/otf
install -m755 -d $fontsdir/svg
paths = [ lilypond ];
${stdenv.lib.concatMapStrings (font: ''
lndir -silent ${font}/otf $fontsdir/otf
lndir -silent ${font}/svg $fontsdir/svg
'') fonts}
buildInputs = [ makeWrapper lndir ];
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
postBuild = ''
for p in $out/bin/*; do
wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
done
'';
})

View File

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