base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / fl / flycast / package.nix
blob18406054b280369ed374351ff7078e08a8b16cf0
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchpatch2
5 , cmake
6 , pkg-config
7 , makeWrapper
8 , alsa-lib
9 , curl
10 , libao
11 , libpulseaudio
12 , libzip
13 , lua
14 , miniupnpc
15 , SDL2
16 , vulkan-loader
19 stdenv.mkDerivation rec {
20   pname = "flycast";
21   version = "2.3.2";
23   src = fetchFromGitHub {
24     owner = "flyinghead";
25     repo = "flycast";
26     rev = "v${version}";
27     hash = "sha256-YFLSUaEikwLPglHh3t8sHiKHRn5cchKzzkJlZDdgVsU=";
28     fetchSubmodules = true;
29   };
31   patches = [
32     # miniupnp: add support for api version 18
33     (fetchpatch2 {
34       url = "https://github.com/flyinghead/flycast/commit/71982eda7a038e24942921e558845103b6c12326.patch?full_index=1";
35       hash = "sha256-5fFCgX7MfCqW7zxXJuHt9js+VTZZKEQHRYuWh7MTKzI=";
36     })
37   ];
39   nativeBuildInputs = [
40     cmake
41     pkg-config
42     makeWrapper
43   ];
45   buildInputs = [
46     alsa-lib
47     curl
48     libao
49     libpulseaudio
50     libzip
51     lua
52     miniupnpc
53     SDL2
54   ];
56   cmakeFlags = [
57     "-DUSE_HOST_SDL=ON"
58   ];
60   postFixup = ''
61     wrapProgram $out/bin/flycast --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}
62   '';
64   meta = with lib; {
65     homepage = "https://github.com/flyinghead/flycast";
66     changelog = "https://github.com/flyinghead/flycast/releases/tag/v${version}";
67     description = "Multi-platform Sega Dreamcast, Naomi and Atomiswave emulator";
68     mainProgram = "flycast";
69     license = licenses.gpl2Only;
70     platforms = platforms.unix;
71     maintainers = [ ];
72   };