From f4264028ad35cf226417cccc9a432095ba9669f1 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Tue, 19 May 2020 22:14:25 +0000 Subject: [PATCH] solfege: 3.22.2 -> 3.23.4 --- pkgs/misc/solfege/css.patch | 33 ++++++++++++++++++++++++++++++ pkgs/misc/solfege/default.nix | 30 ++++++++++++++++----------- pkgs/misc/solfege/menubar.patch | 7 +++++++ pkgs/misc/solfege/webbrowser.patch | 8 ++++++++ pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 pkgs/misc/solfege/css.patch create mode 100644 pkgs/misc/solfege/menubar.patch create mode 100644 pkgs/misc/solfege/webbrowser.patch diff --git a/pkgs/misc/solfege/css.patch b/pkgs/misc/solfege/css.patch new file mode 100644 index 00000000000..40273df0132 --- /dev/null +++ b/pkgs/misc/solfege/css.patch @@ -0,0 +1,33 @@ +Fix theme parsing errors: https://savannah.gnu.org/bugs/index.php?53107 + +--- a/solfege.css ++++ b/solfege.css +@@ -7,19 +7,19 @@ +-#ProgressionNameLabel, #Feedback { font: "Sans 18" } +-#ProgressionLabelNumber { font: "Sans 12" } +-#BoldText { font: Bold } ++#ProgressionNameLabel, #Feedback { font: 18px Sans } ++#ProgressionLabelNumber { font: 12px Sans } ++#BoldText { font: 12px Sans Bold } + +-#StatisticsH1, #Heading1 { font: Sans 18 } +-#StatisticsH2, #Heading2 { font: Sans 14 } ++#StatisticsH1, #Heading1 { font: 18px Sans } ++#StatisticsH2, #Heading2 { font: 14px Sans } + +-#BpmInactiveLabel { font: Sans 12 } +-#BpmActiveLabel { font: Sans Bold 12 } ++#BpmInactiveLabel { font: 12px Sans } ++#BpmActiveLabel { font: 12px Sans Bold } + + #DIALOGWARNING2 { background: red; } + #DIALOGWARNING { background: yellow; } + + #DEBUGWARNING { + background: red; +- font: Sans Bold 24; ++ font: 24px Sans Bold; + } + +-#FlashBarLabel { font: Sans 16 } ++#FlashBarLabel { font: 16px Sans } diff --git a/pkgs/misc/solfege/default.nix b/pkgs/misc/solfege/default.nix index aea4da3eaeb..05e13f3c9aa 100644 --- a/pkgs/misc/solfege/default.nix +++ b/pkgs/misc/solfege/default.nix @@ -1,20 +1,26 @@ -{ stdenv, fetchurl, pkgconfig, pythonPackages, gettext, texinfo -, ghostscript, librsvg, gdk-pixbuf, txt2man, timidity, mpg123 -, alsaUtils, vorbis-tools, csound, lilypond -, wrapGAppsHook +{ lib, fetchurl, gettext, pkgconfig, texinfo, wrapGAppsHook +, buildPythonApplication, pycairo, pygobject3 +, gobject-introspection, gtk3, librsvg +, alsaUtils, timidity, mpg123, vorbis-tools, csound, lilypond }: -pythonPackages.buildPythonApplication rec { - name = "solfege-3.22.2"; +buildPythonApplication rec { + name = "solfege-3.23.4"; src = fetchurl { url = "mirror://sourceforge/solfege/${name}.tar.gz"; - sha256 = "1r4g93ka7i8jh5glii5nza0zq0wy4sw0gfzpvkcrhj9yr1h0jsp4"; + sha256 = "0sc17vf4xz6gy0s0z9ghi68yskikdmyb4gdaxx6imrm40734k8mp"; }; - nativeBuildInputs = [ gettext texinfo pkgconfig wrapGAppsHook ]; - buildInputs = [ librsvg ]; - propagatedBuildInputs = [ pythonPackages.pygtk ]; + patches = [ + ./css.patch + ./menubar.patch + ./webbrowser.patch + ]; + + nativeBuildInputs = [ gettext pkgconfig texinfo wrapGAppsHook ]; + buildInputs = [ gobject-introspection gtk3 librsvg ]; + propagatedBuildInputs = [ pycairo pygobject3 ]; preBuild = '' sed -i -e 's|wav_player=.*|wav_player=${alsaUtils}/bin/aplay|' \ @@ -30,11 +36,11 @@ pythonPackages.buildPythonApplication rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "Ear training program"; homepage = "http://www.solfege.org/"; license = licenses.gpl3; platforms = platforms.linux; - maintainers = [ maintainers.bjornfor ]; + maintainers = with maintainers; [ bjornfor orivej ]; }; } diff --git a/pkgs/misc/solfege/menubar.patch b/pkgs/misc/solfege/menubar.patch new file mode 100644 index 00000000000..36d3944af61 --- /dev/null +++ b/pkgs/misc/solfege/menubar.patch @@ -0,0 +1,7 @@ +Fix https://savannah.gnu.org/bugs/index.php?53109 + +--- a/solfege/mainwin.py ++++ b/solfege/mainwin.py +@@ -270,1 +270,1 @@ +- hdlbox = Gtk.HandleBox() ++ hdlbox = Gtk.HBox() diff --git a/pkgs/misc/solfege/webbrowser.patch b/pkgs/misc/solfege/webbrowser.patch new file mode 100644 index 00000000000..2c9b77d0b8e --- /dev/null +++ b/pkgs/misc/solfege/webbrowser.patch @@ -0,0 +1,8 @@ +Fix startup. + +--- a/solfege/mainwin.py ++++ b/solfege/mainwin.py +@@ -27,2 +27,3 @@ import textwrap + try: ++ webbrowser.register_standard_browsers() + i = webbrowser._tryorder.index("x-www-browser") diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71d390c04e2..7ba9aa9b2f0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25797,7 +25797,7 @@ in nut = callPackage ../applications/misc/nut { }; - solfege = callPackage ../misc/solfege { }; + solfege = python3Packages.callPackage ../misc/solfege { }; disnix = callPackage ../tools/package-management/disnix { };