lilypond, lilypond-unstable: bump version, add passthru.updateScript (#207727)

* lilypond: add passthru.updateScript

* lilypond: 2.22.2 -> 2.24.0

* lilypond-unstable: 2.23.12 -> 2.25.1
This commit is contained in:
Samuel Tam 2023-01-31 01:00:34 +08:00 committed by GitHub
parent d3a6a95f05
commit 742ba56e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 12 deletions

View File

@ -1,19 +1,19 @@
{ stdenv, lib, fetchurl, ghostscript, gyre-fonts, texinfo, imagemagick, texi2html, guile
, python3, gettext, flex, perl, bison, pkg-config, autoreconfHook, dblatex
, fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
, makeWrapper, t1utils
, makeWrapper, t1utils, boehmgc, rsync
, texlive, tex ? texlive.combine {
inherit (texlive) scheme-small lh metafont epsf;
inherit (texlive) scheme-small lh metafont epsf fontinst;
}
}:
stdenv.mkDerivation rec {
pname = "lilypond";
version = "2.22.2";
version = "2.24.0";
src = fetchurl {
url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
sha256 = "sha256-3ekIVPp94QEvThMEpoYXrqmrMiky7AznaYT2DSaqI74=";
sha256 = "sha256-PO2+O5KwJWnjpvLwZ0hYlns9onjXCqPpiu9b3Nf3i2k=";
};
postInstall = ''
@ -43,13 +43,18 @@ stdenv.mkDerivation rec {
buildInputs =
[ ghostscript texinfo imagemagick texi2html guile dblatex tex zip netpbm
python3 gettext perl fontconfig freetype pango
fontforge help2man groff t1utils
fontforge help2man groff t1utils boehmgc rsync
];
autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
enableParallelBuilding = true;
passthru.updateScript = {
command = [ ./update.sh ];
supportedFeatures = [ "commit" ];
};
meta = with lib; {
description = "Music typesetting system";
homepage = "http://lilypond.org/";

View File

@ -1,11 +1,14 @@
{ lib, fetchurl, guile, lilypond }:
{ lib, fetchurl, lilypond }:
(lilypond.override {
inherit guile;
}).overrideAttrs (oldAttrs: rec {
version = "2.23.12";
lilypond.overrideAttrs (oldAttrs: rec {
version = "2.25.1";
src = fetchurl {
url = "https://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
sha256 = "sha256-SLZ9/Jybltd8+1HANk8pTGHRb7MuZSJJDDY/S4Kwz/k=";
sha256 = "sha256-DchY+4+bWIvTZb4v9q/fAqStkbsxHhvty3eur0ZFYVs=";
};
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 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"

View File

@ -37497,7 +37497,7 @@ with pkgs;
inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation Security SystemConfiguration;
};
lilypond = callPackage ../misc/lilypond { guile = guile_1_8; };
lilypond = callPackage ../misc/lilypond { };
lilypond-unstable = callPackage ../misc/lilypond/unstable.nix { };