1 { stdenv, lib, fetchurl, ghostscript, gyre-fonts, texinfo, imagemagick, texi2html, guile_2_2
2 , python3, gettext, flex, perl, bison, pkg-config, autoreconfHook, dblatex
3 , fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
4 , freefont_ttf, makeFontsConf
5 , makeWrapper, t1utils, boehmgc, rsync
6 , texliveSmall, tex ? texliveSmall.withPackages (ps: with ps; [ lh metafont epsf fontinst ])
9 stdenv.mkDerivation rec {
14 url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
15 sha256 = "sha256-eUTmENe08d5Mccz+H73TIB9U+sVFYb3NBIkU+Nu2Ckg=";
19 for f in "$out/bin/"*; do
20 # Override default argv[0] setting so LilyPond can find
21 # its Scheme libraries.
22 wrapProgram "$f" --set GUILE_AUTO_COMPILE 0 \
23 --set PATH "${ghostscript}/bin" \
29 "--disable-documentation"
30 # FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
31 "--with-urwotf-dir=${ghostscript}/share/ghostscript/fonts"
32 "--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
36 sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl
37 export HOME=$TMPDIR/home
40 nativeBuildInputs = [ autoreconfHook bison flex makeWrapper pkg-config ];
43 [ ghostscript texinfo imagemagick texi2html guile_2_2 dblatex tex zip netpbm
44 python3 gettext perl fontconfig freetype pango
45 fontforge help2man groff t1utils boehmgc rsync
48 autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
50 enableParallelBuilding = true;
52 passthru.updateScript = {
53 command = [ ./update.sh ];
54 supportedFeatures = [ "commit" ];
58 description = "Music typesetting system";
59 homepage = "http://lilypond.org/";
60 license = licenses.gpl3;
61 maintainers = with maintainers; [ marcweber yurrriq ];
62 platforms = platforms.all;
65 FONTCONFIG_FILE = lib.optional stdenv.isDarwin (makeFontsConf {
66 fontDirectories = [ freefont_ttf ];