summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-01-30 18:01:30 +0000
committerGitHub <noreply@github.com>2023-01-30 18:01:30 +0000
commit872d17dee84e3c20b85f311f4770b34662ba7e4d (patch)
tree83ee5c1afa48f2c900896b50355e73dec6b451a6 /pkgs/misc
parent1a06f52c217f490c7aae2160a9dcec217b7d2e46 (diff)
parent2c257a212e26cb9d81d70640aed733afc716aee6 (diff)
downloadnixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.tar
nixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.tar.gz
nixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.tar.bz2
nixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.tar.lz
nixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.tar.xz
nixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.tar.zst
nixpkgs-872d17dee84e3c20b85f311f4770b34662ba7e4d.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/lilypond/default.nix15
-rw-r--r--pkgs/misc/lilypond/unstable.nix15
-rwxr-xr-xpkgs/misc/lilypond/update.sh25
3 files changed, 44 insertions, 11 deletions
diff --git a/pkgs/misc/lilypond/default.nix b/pkgs/misc/lilypond/default.nix
index 9527c156e48..ac18998130a 100644
--- a/pkgs/misc/lilypond/default.nix
+++ b/pkgs/misc/lilypond/default.nix
@@ -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/";
diff --git a/pkgs/misc/lilypond/unstable.nix b/pkgs/misc/lilypond/unstable.nix
index a8472b66f1f..468cd51439e 100644
--- a/pkgs/misc/lilypond/unstable.nix
+++ b/pkgs/misc/lilypond/unstable.nix
@@ -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" ];
   };
 })
diff --git a/pkgs/misc/lilypond/update.sh b/pkgs/misc/lilypond/update.sh
new file mode 100755
index 00000000000..e9c3f48805a
--- /dev/null
+++ b/pkgs/misc/lilypond/update.sh
@@ -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"