about summary refs log tree commit diff
path: root/pkgs/applications/audio/cozy/default.nix
blob: 65cad453f6b73cfe609c62041fa561aac08a0909 (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
64
65
66
67
68
69
70
71
72
73
74
{ lib
, python3Packages
, fetchFromGitHub
, meson
, ninja
, pkg-config
, wrapGAppsHook4
, appstream-glib
, desktop-file-utils
, gobject-introspection
, libadwaita
, gst_all_1
}:

python3Packages.buildPythonApplication rec {
  pname = "cozy";
  version = "1.3.0";
  pyproject = false; # built with meson

  src = fetchFromGitHub {
    owner = "geigi";
    repo = "cozy";
    rev = version;
    hash = "sha256-oMgdz2dny0u1XV13aHu5s8/pcAz8z/SAOf4hbCDsdjw";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    wrapGAppsHook4
    appstream-glib
    desktop-file-utils
    gobject-introspection
  ];

  buildInputs = [
    libadwaita
  ] ++ (with gst_all_1; [
    gstreamer
    gst-plugins-good
    gst-plugins-ugly
    gst-plugins-base
    gst-plugins-bad
  ]);

  propagatedBuildInputs = with python3Packages; [
    distro
    mutagen
    peewee
    pygobject3
    pytz
    requests
  ];

  dontWrapGApps = true;

  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  postFixup = ''
    ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy
  '';

  meta = with lib; {
    description = "A modern audio book player for Linux";
    homepage = "https://cozy.geigi.de/";
    maintainers = with maintainers; [ makefu aleksana ];
    license = licenses.gpl3Plus;
    mainProgram = "com.github.geigi.cozy";
    platforms = platforms.linux;
  };
}