-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- get rid of rec - use fetchFromGitHub (since the url is deactivated)
- Loading branch information
1 parent
23d8eb5
commit 7b55d37
Showing
1 changed file
with
33 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
{ fetchurl | ||
, fetchpatch | ||
, lzwolf | ||
, SDL2_mixer | ||
, timidity | ||
{ | ||
SDL2_mixer, | ||
fetchFromGitHub, | ||
fetchpatch, | ||
lzwolf, | ||
timidity, | ||
}: | ||
|
||
SDL2_mixer.overrideAttrs(oa: rec { | ||
version = "2.0.4"; | ||
let | ||
attrset = { | ||
version = "2.0.4"; | ||
|
||
src = fetchurl { | ||
url = "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${version}.tar.gz"; | ||
sha256 = "0694vsz5bjkcdgfdra6x9fq8vpzrl8m6q96gh58df7065hw5mkxl"; | ||
}; | ||
src = fetchFromGitHub { | ||
owner = "libsdl-org"; | ||
repo = "SDL_mixer"; | ||
rev = "release-${attrset.version}"; | ||
hash = "sha256-vo9twUGeK2emDiGd9kSGuA/X8TxVmQrRFFm71zawWYM="; | ||
}; | ||
|
||
patches = [ | ||
# These patches fix incompatible function pointer conversion errors with clang 16. | ||
(fetchpatch { | ||
url = "https://github.com/libsdl-org/SDL_mixer/commit/4119ec3fe838d38d2433f4432cd18926bda5d093.patch"; | ||
stripLen = 2; | ||
hash = "sha256-Ug1EEZIRcV8+e1MeMsGHuTW7Zn6j4szqujP8IkIq2VM="; | ||
}) | ||
# Based on https://github.com/libsdl-org/SDL_mixer/commit/64ab759111ddb1b033bcce64e1a04e0cba6e498f | ||
./SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch | ||
]; | ||
patches = [ | ||
# These patches fix incompatible function pointer conversion errors with clang 16. | ||
(fetchpatch { | ||
url = "https://github.com/libsdl-org/SDL_mixer/commit/4119ec3fe838d38d2433f4432cd18926bda5d093.patch"; | ||
stripLen = 2; | ||
hash = "sha256-Ug1EEZIRcV8+e1MeMsGHuTW7Zn6j4szqujP8IkIq2VM="; | ||
}) | ||
# Based on https://github.com/libsdl-org/SDL_mixer/commit/64ab759111ddb1b033bcce64e1a04e0cba6e498f | ||
./SDL_mixer-2.0-incompatible-pointer-comparison-fix.patch | ||
]; | ||
|
||
# fix default path to timidity.cfg so MIDI files could be played | ||
postPatch = '' | ||
substituteInPlace timidity/options.h \ | ||
--replace "/usr/share/timidity" "${timidity}/share/timidity" | ||
''; | ||
# fix default path to timidity.cfg so MIDI files could be played | ||
postPatch = '' | ||
substituteInPlace timidity/options.h \ | ||
--replace "/usr/share/timidity" "${timidity}/share/timidity" | ||
''; | ||
|
||
passthru.tests.lzwolf = lzwolf; | ||
}) | ||
passthru.tests.lzwolf = lzwolf; | ||
}; | ||
in SDL2_mixer.overrideAttrs(_: attrset) |