summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/sw/switchfin/package.nix
blob: 94f64039b2228e780300c4d83b3184fb984aa6fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  pkg-config,
  curl,
  dbus,
  ffmpeg,
  fmt_11,
  libwebp,
  mpv,
  SDL2,
  tinyxml-2,
  tweeny,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "switchfin";
  version = "0.9.4";

  src = fetchFromGitHub {
    owner = "dragonflylee";
    repo = "switchfin";
    rev = finalAttrs.version;
    hash = "sha256-PDDKrnW8kLx6Twm6gI4I0l7uZJXfk29q9RPstXOxt+0=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  buildInputs = [
    curl
    dbus
    ffmpeg
    fmt_11
    libwebp
    mpv
    SDL2
    tinyxml-2
  ];

  cmakeFlags = [
    "-DCMAKE_INSTALL=ON"

    "-DPLATFORM_DESKTOP=ON"
    "-DUSE_EGL=ON"
    "-DUSE_SDL2=ON"

    "-DUSE_SYSTEM_CURL=ON"
    "-DUSE_SYSTEM_FMT=ON"
    "-DUSE_SYSTEM_SDL2=ON"
    "-DUSE_SYSTEM_TINYXML2=ON"
    # Should be enabled in the next release, see:
    # https://github.com/dragonflylee/switchfin/issues/242
    "-DUSE_SYSTEM_TWEENY=OFF"
  ];

  meta = {
    description = "Third-party native Jellyfin client for PC/PS4/PSVita/Nintendo Switch";
    homepage = "https://github.com/dragonflylee/switchfin";
    changelog = "https://github.com/dragonflylee/switchfin/blob/${finalAttrs.src.rev}/CHANGELOG.md";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.k900 ];
    mainProgram = "Switchfin";
    platforms = lib.platforms.all;
  };
})