Without the change client programs like `fheroes2` fail to load `MIDI`
files:
$ nix run -f '<nixpkgs>' fheroes2
$ 14.03.2023 22:22:21: [ERROR] createMusic: Failed to create a music track from memory. The error: Couldn't open timidity.cfg
After the change music plays as expected. It's a forward-port of the
same fix that `SDL2_mixer` had in f11d1d9 ("SDl2_mixer: fix MIDI
playback by adding timidity paths")
`SDL2_mixer` is a a popular game dependency. Split it's `dev` output to
separate store path to reduce runtime closure size.
While at it amend a few games's include paths.
Noticed on fheroes2 package: before the change fheroes2 was not able to
play MIDI samples and complained as:
PlayMusic: music parameter was NULL
It happens because default search paths for 'timidity.cfg'
did not include any of nixos's paths in 'timidity/options.h':
getenv("TIMIDITY_CFG")
"."
#define DEFAULT_PATH "/etc/timidity"
#define DEFAULT_PATH1 "/usr/share/timidity"
#define DEFAULT_PATH2 "/usr/local/share/timidity"
#define DEFAULT_PATH3 "/usr/local/lib/timidity"
As a result even with globally installed timidity MIDI can't be played.
abuse package also has the same problem and works it around by changing
directory to local copy of 'timidity.cfg':
# The timidity bundled into SDL_mixer looks in . and in several global places
# like /etc for its configuration file.
cd @out@/etc
exec @out@/bin/.abuse-bin "$@"
The change fixes SDL2_mixer by changing "/usr/share/timidity" path
to nix's timidity store path. Tested on fheroes2 with MIDI files.
* treewide: http -> https sources
This updates the source urls of all top-level packages from http to
https where possible.
* buildtorrent: fix url and tab -> spaces
* pkgs: refactor needless quoting of homepage meta attribute
A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.
* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit
* Fixed some instances