Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / misc / solfege / default.nix
blobaf2ce3f53cf20c981cb6691f08d5c640dd8014da
1 { lib, fetchurl, gettext, pkg-config, texinfo, wrapGAppsHook
2 , buildPythonApplication, pycairo, pygobject3
3 , gobject-introspection, gtk3, librsvg
4 , alsaUtils, timidity, mpg123, vorbis-tools, csound, lilypond
5 }:
7 buildPythonApplication rec {
8   name = "solfege-3.23.4";
10   src = fetchurl {
11     url = "mirror://sourceforge/solfege/${name}.tar.gz";
12     sha256 = "0sc17vf4xz6gy0s0z9ghi68yskikdmyb4gdaxx6imrm40734k8mp";
13   };
15   patches = [
16     ./css.patch
17     ./menubar.patch
18     ./texinfo.patch
19     ./webbrowser.patch
20   ];
22   nativeBuildInputs = [ gettext pkg-config texinfo wrapGAppsHook ];
23   buildInputs = [ gobject-introspection gtk3 librsvg ];
24   propagatedBuildInputs = [ pycairo pygobject3 ];
26   preBuild = ''
27     sed -i -e 's|wav_player=.*|wav_player=${alsaUtils}/bin/aplay|' \
28            -e 's|midi_player=.*|midi_player=${timidity}/bin/timidity|' \
29            -e 's|mp3_player=.*|mp3_player=${mpg123}/bin/mpg123|' \
30            -e 's|ogg_player=.*|ogg_player=${vorbis-tools}/bin/ogg123|' \
31            -e 's|csound=.*|csound=${csound}/bin/csound|' \
32            -e 's|lilypond-book=.*|lilypond-book=${lilypond}/bin/lilypond-book|' \
33            default.config
34   '';
36   format = "other";
38   enableParallelBuilding = true;
40   meta = with lib; {
41     description = "Ear training program";
42     homepage = "https://www.solfege.org/";
43     license = licenses.gpl3;
44     platforms = platforms.linux;
45     maintainers = with maintainers; [ bjornfor orivej ];
46   };