SDL2_sound: 2.0.1 -> 2.0.4; modernize (#420257)
This commit is contained in:
commit
d0aef5b0a2
@ -2,53 +2,57 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
fetchpatch,
|
|
||||||
cmake,
|
cmake,
|
||||||
SDL2,
|
SDL2,
|
||||||
flac,
|
nix-update-script,
|
||||||
libmikmod,
|
|
||||||
libvorbis,
|
|
||||||
timidity,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
# As of 2025-06-27 this library has no dependents in nixpkgs (https://github.com/NixOS/nixpkgs/pull/420339) and is
|
||||||
|
# considered for deletion.
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "SDL2_sound";
|
pname = "SDL2_sound";
|
||||||
version = "2.0.1";
|
version = "2.0.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "icculus";
|
owner = "icculus";
|
||||||
repo = "SDL_sound";
|
repo = "SDL_sound";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-N2znqy58tMHgYa07vEsSedWLRhoJzDoINcsUu0UYLnA=";
|
hash = "sha256-5t2ELm8d8IX+cIJqGl/8sffwXGj5Cm0kZI6+bmjvvPg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
outputs = [
|
||||||
(fetchpatch {
|
"out"
|
||||||
# https://github.com/icculus/SDL_sound/pull/32 - fix build on darwin
|
"lib"
|
||||||
# can be dropped on the next update
|
"dev"
|
||||||
url = "https://github.com/icculus/SDL_sound/commit/c15d75b7720113b28639baad284f45f943846294.patch";
|
|
||||||
hash = "sha256-4GL8unsZ7eNkzjLXq9QdaxFQMzX2tdP0cBR1jTaRLc0=";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
cmakeFlags = [ "-DSDLSOUND_DECODER_MIDI=1" ];
|
cmakeFlags = [
|
||||||
|
(lib.cmakeBool "SDLSOUND_DECODER_MIDI" true)
|
||||||
buildInputs = [
|
(lib.cmakeBool "SDLSOUND_BUILD_SHARED" (!stdenv.hostPlatform.isStatic))
|
||||||
SDL2
|
(lib.cmakeBool "SDLSOUND_BUILD_STATIC" stdenv.hostPlatform.isStatic)
|
||||||
flac
|
|
||||||
libmikmod
|
|
||||||
libvorbis
|
|
||||||
timidity
|
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
buildInputs = [ SDL2 ];
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "SDL2 sound library";
|
description = "SDL2 sound library";
|
||||||
mainProgram = "playsound";
|
mainProgram = "playsound";
|
||||||
platforms = platforms.unix;
|
platforms = lib.platforms.all;
|
||||||
license = licenses.zlib;
|
license = with lib.licenses; [
|
||||||
|
zlib
|
||||||
|
|
||||||
|
# various vendored decoders
|
||||||
|
publicDomain
|
||||||
|
|
||||||
|
# timidity
|
||||||
|
artistic1
|
||||||
|
lgpl21Only
|
||||||
|
];
|
||||||
teams = [ lib.teams.sdl ];
|
teams = [ lib.teams.sdl ];
|
||||||
homepage = "https://www.icculus.org/SDL_sound/";
|
homepage = "https://www.icculus.org/SDL_sound/";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user