push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,146 @@
{
stdenv,
lib,
fetchzip,
ghostscript,
texinfo,
imagemagick,
texi2html,
extractpdfmark,
guile,
python3,
gettext,
glib,
gmp,
flex,
perl,
bison,
pkg-config,
autoreconfHook,
dblatex,
fontconfig,
freetype,
pango,
fontforge,
help2man,
freefont_ttf,
makeFontsConf,
makeWrapper,
t1utils,
boehmgc,
rsync,
coreutils,
texliveSmall,
tex ? texliveSmall.withPackages (
ps: with ps; [
epsf
fontinst
fontware
lh
metafont
]
),
}:
stdenv.mkDerivation rec {
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 = ''
for f in "$out/bin/"*; do
# Override default argv[0] setting so LilyPond can find
# its Scheme libraries.
wrapProgram "$f" \
--set GUILE_AUTO_COMPILE 0 \
--prefix PATH : "${
lib.makeBinPath [
ghostscript
coreutils
(placeholder "out")
]
}" \
--argv0 "$f"
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";
enableParallelBuilding = true;
passthru.updateScript = {
command = [ ./update.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 {
fontDirectories = [ freefont_ttf ];
});
}

View File

@@ -0,0 +1,150 @@
{
lib,
stdenv,
fetchFromGitHub,
lilypond,
}:
let
olpFont =
{
fontName,
rev,
sha256,
version ? rev,
...
}:
stdenv.mkDerivation {
inherit version;
pname = "openlilypond-font-${fontName}";
src = fetchFromGitHub {
inherit rev sha256;
owner = "OpenLilyPondFonts";
repo = fontName;
};
installPhase = ''
local fontsdir="$out/share/lilypond/${lilypond.version}/fonts"
install -m755 -d "$fontsdir/otf"
shopt -s globstar
for font in {otf,supplementary-fonts,supplementary-files}/**/*.{o,t}tf; do
echo $font
install -Dt "$fontsdir/otf" -m644 "$font"
done
install -m755 -d "$fontsdir/svg"
for font in {svg,woff}/**.{svg,woff}; do
install -Dt "$fontsdir/svg" -m644 "$font"
done
'';
meta = with lib; {
inherit (lilypond.meta) homepage platforms;
description = "${fontName} font for LilyPond";
license = licenses.ofl;
maintainers = with maintainers; [ yurrriq ];
};
};
in
rec {
beethoven = olpFont {
fontName = "beethoven";
rev = "669f400";
sha256 = "17wdklg5shmqwnb7b81qavfg52v32wx5yf15c6al0hbvv1nqqj2i";
};
bravura = olpFont {
fontName = "bravura";
rev = "53c7744";
sha256 = "1p27w1c3bzxlnm6rzq8n7dbfjwbxqjy4r0fhkmk9jbm8awmzw214";
};
cadence = olpFont {
fontName = "cadence";
rev = "1cc0fb7";
sha256 = "1zxb3m8glh8iwj8mzcgyaxhlq0bji0rwniw702m70h9kpifiim1j";
};
gonville = olpFont {
fontName = "gonville";
rev = "a638bc9";
sha256 = "15khy9677crgd6bpajn7l1drysgxy49wiym3b248khgpavidwyy9";
};
gutenberg1939 = olpFont {
fontName = "gutenberg1939";
rev = "2316a35";
sha256 = "1lkhivmrx92z37zfrb5mkhzhwggyaga9cm0wl89r0n2f2kayyc7q";
};
haydn = olpFont {
fontName = "haydn";
rev = "9e7de8b";
sha256 = "1jmbhb2jm887sdc498l2jilpivq1d8lmmgdb8lp59lv8d9fx105z";
};
improviso = olpFont {
fontName = "improviso";
rev = "0753f5a";
sha256 = "1clin9c74gjhhira12mwxynxn4b1ixij5bg04mvk828lbr740mfm";
};
lilyboulez = olpFont {
fontName = "lilyboulez";
rev = "e8455fc";
sha256 = "0mq92x0rbgfb6s7ipgg2zcxika2si30w3ay89rp7m6vwca01649y";
};
lilyjazz = olpFont {
fontName = "lilyjazz";
rev = "8fa7d554";
sha256 = "1z7px7k2sn7snnj7yfjv0p9axwbn452vn9ww9icmb1249b0d1qry";
};
lv-goldenage = olpFont {
fontName = "lv-goldenage";
rev = "8a92fd3";
sha256 = "03nbd1vmlaj7wkhsnl2lq09nafv7zj1k518zs966vclzah94qghp";
};
paganini = olpFont {
fontName = "paganini";
rev = "8e4e55a";
sha256 = "0gw9wr4hfn205j40rpgnfddhzhn9x4pwfinamj5b7607880nvx29";
};
profondo = olpFont {
fontName = "profondo";
rev = "8cfb668";
sha256 = "0armwbg9y0l935949b7klngws6fq42fi944lws61qvjl61780br8";
};
ross = olpFont {
fontName = "ross";
rev = "aa8127f";
sha256 = "1w2x3pd1d1z4x0107dpq95v7m547cj4nkkzxgqpmzfqa0074idqd";
};
scorlatti = olpFont {
fontName = "scorlatti";
rev = "1db87da";
sha256 = "07jam5hwdy6bydrm98cdla6p6rl8lmy8zzsfq46i55l64l3w956h";
};
sebastiano = olpFont {
fontName = "sebastiano";
rev = "44bf262";
sha256 = "09i8p3p4z6vz69j187cpxvikkgc4pk6gxippahy0k7i7bh0d4qaj";
};
all = [
beethoven
bravura
cadence
gonville
gutenberg1939
haydn
improviso
lilyboulez
lilyjazz
lv-goldenage
paganini
profondo
ross
scorlatti
sebastiano
];
}

View File

@@ -0,0 +1,21 @@
{
lib,
fetchzip,
lilypond,
}:
lilypond.overrideAttrs (oldAttrs: rec {
version = "2.25.27";
src = fetchzip {
url = "https://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
hash = "sha256-cZ6XZt1y646Kke3wdJ5Jo9ieOejbojsEBSkAvLDXNPw=";
};
passthru.updateScript = {
command = [
./update.sh
"unstable"
];
supportedFeatures = [ "commit" ];
};
})

25
pkgs/misc/lilypond/update.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl gnused nix
set -euo pipefail
if [ $# -gt 0 ] && [ "$1" = "unstable" ]; then
ATTR="lilypond-unstable"
FILE="$(dirname "${BASH_SOURCE[@]}")/unstable.nix"
QUERY="VERSION_DEVEL="
else
ATTR="lilypond"
FILE="$(dirname "${BASH_SOURCE[@]}")/default.nix"
QUERY="VERSION_STABLE="
fi
# update version
PREV=$(nix eval --raw -f default.nix $ATTR.version)
NEXT=$(curl -s 'https://gitlab.com/lilypond/lilypond/-/raw/master/VERSION' | grep "$QUERY" | cut -d= -f2)
sed -i "s|$PREV|$NEXT|" "$FILE"
echo "[{\"commitMessage\":\"$ATTR: $PREV -> $NEXT\"}]"
# update hash
PREV=$(nix eval --raw -f default.nix $ATTR.src.outputHash)
NEXT=$(nix --extra-experimental-features nix-command 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"

View File

@@ -0,0 +1,21 @@
{
lib,
symlinkJoin,
makeWrapper,
lilypond,
openlilylib-fonts,
}:
lib.appendToName "with-fonts" (symlinkJoin {
inherit (lilypond) meta name version;
paths = [ lilypond ] ++ openlilylib-fonts.all;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
for p in $out/bin/*; do
wrapProgram "$p" --set LILYPOND_DATADIR "$out/share/lilypond/${lilypond.version}"
done
'';
})