1 { stdenv, lib, fetchurl, ghostscript, gyre-fonts, texinfo, imagemagick, texi2html, guile
2 , python3, gettext, flex, perl, bison, pkg-config, autoreconfHook, dblatex
3 , fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
5 , texlive, tex ? texlive.combine {
6 inherit (texlive) scheme-small lh metafont epsf;
10 stdenv.mkDerivation rec {
15 url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
16 sha256 = "0khg9dlm1b02mm9w54xqc9ydj416xkikn6p08g1asiyjf4qx1pb4";
20 for f in "$out/bin/"*; do
21 # Override default argv[0] setting so LilyPond can find
22 # its Scheme libraries.
23 wrapProgram "$f" --set GUILE_AUTO_COMPILE 0 \
24 --set PATH "${ghostscript}/bin" \
30 "--disable-documentation"
31 # FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
32 "--with-urwotf-dir=${ghostscript}/share/ghostscript/fonts"
33 "--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
37 sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl
38 export HOME=$TMPDIR/home
41 nativeBuildInputs = [ autoreconfHook bison flex makeWrapper pkg-config ];
44 [ ghostscript texinfo imagemagick texi2html guile dblatex tex zip netpbm
45 python3 gettext perl fontconfig freetype pango
46 fontforge help2man groff t1utils
49 autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
51 enableParallelBuilding = true;
54 description = "Music typesetting system";
55 homepage = "http://lilypond.org/";
56 license = licenses.gpl3;
57 maintainers = with maintainers; [ marcweber yurrriq ];
58 platforms = platforms.all;