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
4 , freefont_ttf, makeFontsConf
5 , makeWrapper, t1utils, boehmgc, rsync, coreutils
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-6W+gNXHHnyDhl5ZTr6vb5O5Cdlo9n9FJU/DNnupReBw=";
19 for f in "$out/bin/"*; do
20 # Override default argv[0] setting so LilyPond can find
21 # its Scheme libraries.
23 --set GUILE_AUTO_COMPILE 0 \
24 --prefix PATH : "${lib.makeBinPath [ ghostscript coreutils (placeholder "out") ]}" \
30 "--disable-documentation"
31 # FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
32 "--with-urwotf-dir=${ghostscript.fonts}/share/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 boehmgc rsync
49 autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
51 enableParallelBuilding = true;
53 passthru.updateScript = {
54 command = [ ./update.sh ];
55 supportedFeatures = [ "commit" ];
59 description = "Music typesetting system";
60 homepage = "http://lilypond.org/";
61 license = licenses.gpl3;
62 maintainers = with maintainers; [ marcweber yurrriq ];
63 platforms = platforms.all;
66 FONTCONFIG_FILE = lib.optional stdenv.hostPlatform.isDarwin (makeFontsConf {
67 fontDirectories = [ freefont_ttf ];