ps3-disc-dumper: 3.2.3 -> 4.2.5, .NET 6 -> 9 (#361506)
[NixPkgs.git] / pkgs / by-name / sd / SDL2_sound / package.nix
blob9ec2ec4e3cff94593ea074d607be5b23479714e9
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   fetchpatch,
6   cmake,
7   SDL2,
8   flac,
9   libmikmod,
10   libvorbis,
11   timidity,
12   darwin,
15 let
16   inherit (darwin.apple_sdk.frameworks)
17     AudioToolbox
18     CoreAudio
19     ;
21 stdenv.mkDerivation rec {
22   pname = "SDL2_sound";
23   version = "2.0.1";
25   src = fetchFromGitHub {
26     owner = "icculus";
27     repo = "SDL_sound";
28     rev = "v${version}";
29     hash = "sha256-N2znqy58tMHgYa07vEsSedWLRhoJzDoINcsUu0UYLnA=";
30   };
32   patches = [
33     (fetchpatch {
34       # https://github.com/icculus/SDL_sound/pull/32 - fix build on darwin
35       # can be dropped on the next update
36       url = "https://github.com/icculus/SDL_sound/commit/c15d75b7720113b28639baad284f45f943846294.patch";
37       hash = "sha256-4GL8unsZ7eNkzjLXq9QdaxFQMzX2tdP0cBR1jTaRLc0=";
38     })
39   ];
41   nativeBuildInputs = [ cmake ];
43   cmakeFlags = [ "-DSDLSOUND_DECODER_MIDI=1" ];
45   buildInputs =
46     [
47       SDL2
48       flac
49       libmikmod
50       libvorbis
51       timidity
52     ]
53     ++ lib.optionals stdenv.hostPlatform.isDarwin [
54       AudioToolbox
55       CoreAudio
56     ];
58   meta = with lib; {
59     description = "SDL2 sound library";
60     mainProgram = "playsound";
61     platforms = platforms.unix;
62     license = licenses.zlib;
63     homepage = "https://www.icculus.org/SDL_sound/";
64   };