about summary refs log tree commit diff
path: root/pkgs/applications/audio/mpd-touch-screen-gui/default.nix
blob: 87f2dea11f065cdc8c4392573ce737d4b90e1a73 (plain) (blame)
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
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, autoreconfHook
, SDL2
, SDL2_ttf
, SDL2_image
, boost
, libmpdclient
, libwtk-sdl2
, icu
, libconfig
, dejavu_fonts
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "mpd-touch-screen-gui";
  version = "unstable-2022-12-30";

  src = fetchFromGitHub {
    owner = "muesli4";
    repo = "mpd-touch-screen-gui";
    rev = "156eaebede89da2b83a98d8f9dfa46af12282fb4";
    sha256 = "sha256-vr/St4BghrndjUQ0nZI/uJq+F/MjEj6ulc4DYwQ/pgU=";
  };

  nativeBuildInputs = [
    pkg-config
    autoreconfHook
  ];

  postPatch = ''
    sed -i s#/usr/share/fonts/TTF#${dejavu_fonts}/share/fonts/truetype#g data/program.conf
  '';

  buildInputs = [
    SDL2
    SDL2_ttf
    SDL2_image
    boost
    libmpdclient
    libwtk-sdl2
    icu
    libconfig
  ];

  # https://stackoverflow.com/questions/53089494/configure-error-could-not-find-a-version-of-the-library
  configureFlags = [
    "--with-boost-libdir=${boost.out}/lib"
  ];

  doCheck = true;

  meta = with lib; {
    description = "Small MPD client that let's you view covers and has controls suitable for small touchscreens";
    homepage = "https://github.com/muesli4/mpd-touch-screen-gui";
    # See: https://github.com/muesli4/mpd-touch-screen-gui/tree/master/LICENSES
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ doronbehar ];
    platforms = platforms.all;
  };
})