lilypond: modernise, enable docs (#393173)

Changed files
+56 -48
pkgs
+51 -43
pkgs/misc/lilypond/default.nix
···
{
stdenv,
lib,
-
fetchurl,
ghostscript,
-
gyre-fonts,
texinfo,
imagemagick,
texi2html,
guile,
python3,
gettext,
flex,
perl,
bison,
···
pango,
fontforge,
help2man,
-
zip,
-
netpbm,
-
groff,
freefont_ttf,
makeFontsConf,
makeWrapper,
···
texliveSmall,
tex ? texliveSmall.withPackages (
ps: with ps; [
-
lh
-
metafont
epsf
fontinst
]
),
}:
···
pname = "lilypond";
version = "2.24.4";
-
src = fetchurl {
url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
-
sha256 = "sha256-6W+gNXHHnyDhl5ZTr6vb5O5Cdlo9n9FJU/DNnupReBw=";
};
postInstall = ''
···
done
'';
-
configureFlags = [
-
"--disable-documentation"
-
# FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
-
"--with-urwotf-dir=${ghostscript.fonts}/share/fonts"
-
"--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
-
];
-
preConfigure = ''
-
sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl
-
export HOME=$TMPDIR/home
'';
nativeBuildInputs = [
autoreconfHook
bison
-
flex
makeWrapper
pkg-config
];
buildInputs = [
-
ghostscript
-
texinfo
-
imagemagick
-
texi2html
-
guile
-
dblatex
-
tex
-
zip
-
netpbm
-
python3
-
gettext
-
perl
-
fontconfig
freetype
pango
-
fontforge
-
help2man
-
groff
-
t1utils
-
boehmgc
-
rsync
];
autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
···
supportedFeatures = [ "commit" ];
};
-
meta = with lib; {
description = "Music typesetting system";
-
homepage = "http://lilypond.org/";
-
license = licenses.gpl3;
-
maintainers = with maintainers; [
marcweber
yurrriq
];
-
platforms = platforms.all;
};
FONTCONFIG_FILE = lib.optional stdenv.hostPlatform.isDarwin (makeFontsConf {
···
{
stdenv,
lib,
+
fetchzip,
ghostscript,
texinfo,
imagemagick,
texi2html,
+
extractpdfmark,
guile,
python3,
gettext,
+
glib,
+
gmp,
flex,
perl,
bison,
···
pango,
fontforge,
help2man,
freefont_ttf,
makeFontsConf,
makeWrapper,
···
texliveSmall,
tex ? texliveSmall.withPackages (
ps: with ps; [
epsf
fontinst
+
fontware
+
lh
+
metafont
]
),
}:
···
pname = "lilypond";
version = "2.24.4";
+
src = fetchzip {
url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
+
hash = "sha256-UYdORvodrVchxslOxpMiXrAh7DtB9sWp9yqZU/jeB9Y=";
};
postInstall = ''
···
done
'';
preConfigure = ''
+
substituteInPlace scripts/build/mf2pt1.pl \
+
--replace-fail "mem=mf2pt1" "mem=$PWD/mf/mf2pt1"
'';
+
strictDeps = true;
+
+
depsBuildBuild = [
+
pkg-config
+
];
+
nativeBuildInputs = [
autoreconfHook
bison
+
dblatex
+
extractpdfmark
+
flex # for flex binary
+
fontconfig
+
fontforge
+
gettext
+
ghostscript
+
guile
+
help2man
+
imagemagick
makeWrapper
+
perl
pkg-config
+
python3
+
rsync
+
t1utils
+
tex
+
texi2html
+
texinfo
];
buildInputs = [
+
boehmgc
+
flex # FlexLexer.h
freetype
+
glib
+
gmp
pango
];
autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
···
supportedFeatures = [ "commit" ];
};
+
# documentation makefile uses "out" for different purposes, hence we explicitly set it to an empty string
+
makeFlags = [ "out=" ];
+
+
meta = {
description = "Music typesetting system";
+
homepage = "https://lilypond.org/";
+
license = with lib.licenses; [
+
gpl3Plus # most code
+
gpl3Only # ly/articulate.ly
+
fdl13Plus # docs
+
ofl # mf/
+
];
+
maintainers = with lib.maintainers; [
marcweber
yurrriq
];
+
platforms = lib.platforms.all;
};
FONTCONFIG_FILE = lib.optional stdenv.hostPlatform.isDarwin (makeFontsConf {
+4 -4
pkgs/misc/lilypond/unstable.nix
···
{
lib,
-
fetchurl,
lilypond,
}:
lilypond.overrideAttrs (oldAttrs: rec {
-
version = "2.25.24";
-
src = fetchurl {
url = "https://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
-
hash = "sha256-1n6mJBbZcfQYsmrjWxcG/EtIyF9uHNRVT7fX3+zoXc4=";
};
passthru.updateScript = {
···
{
lib,
+
fetchzip,
lilypond,
}:
lilypond.overrideAttrs (oldAttrs: rec {
+
version = "2.25.25";
+
src = fetchzip {
url = "https://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
+
hash = "sha256-OO3yXA2PgOuUUR4Bo5wP4PieBvIxV1N9hPiapOB6cAE=";
};
passthru.updateScript = {
+1 -1
pkgs/misc/lilypond/update.sh
···
# update hash
PREV=$(nix eval --raw -f default.nix $ATTR.src.outputHash)
-
NEXT=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 $(nix eval --raw -f default.nix $ATTR.src.url)))
sed -i "s|$PREV|$NEXT|" "$FILE"
···
# update hash
PREV=$(nix eval --raw -f default.nix $ATTR.src.outputHash)
+
NEXT=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 --unpack $(nix eval --raw -f default.nix $ATTR.src.url)))
sed -i "s|$PREV|$NEXT|" "$FILE"