about summary refs log tree commit diff
path: root/pkgs/applications/video/clapper/default.nix
blob: 12a66c90e8d5408979f177e1e8365466f3763fd0 (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
75
76
77
78
79
80
81
82
{ config
, lib
, stdenv
, fetchFromGitHub
, gobject-introspection
, pkg-config
, ninja
, desktop-file-utils
, makeWrapper
, shared-mime-info
, wrapGAppsHook4
, meson
, gtk4
, gst_all_1
, libGL
, libadwaita
, libsoup_3
, vala
, cmake
, libmicrodns
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "clapper";
  version = "0.6.1";

  src = fetchFromGitHub {
    owner  = "Rafostar";
    repo   = "clapper";
    rev    = finalAttrs.version;
    hash = "sha256-IQJTnLB6FzYYPONOqBkvi89iF0U6fx/aWYvNOOJpBvc=";
  };

  nativeBuildInputs = [
    gobject-introspection
    meson
    cmake
    ninja
    makeWrapper
    pkg-config
    wrapGAppsHook4 # for gsettings
    desktop-file-utils # for update-desktop-database
    shared-mime-info # for update-mime-database
    vala
  ];

  buildInputs = [
    gst_all_1.gstreamer
    gst_all_1.gst-plugins-base
    gst_all_1.gst-plugins-good
    gst_all_1.gst-plugins-bad
    gst_all_1.gst-plugins-ugly
    gtk4
    libGL
    libadwaita
    libsoup_3
    libmicrodns
  ];

  postPatch = ''
    patchShebangs --build build-aux/meson/postinstall.py
  '';

  # The package uses "clappersink" provided by itself
  preFixup = ''
    gappsWrapperArgs+=(
      --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : $out/lib/gstreamer-1.0
    )
  '';

  meta = with lib; {
    description = "GNOME media player built using GTK4 toolkit and powered by GStreamer with OpenGL rendering";
    longDescription = ''
      Clapper is a GNOME media player built using the GTK4 toolkit.
      The media player is using GStreamer as a media backend.
    '';
    homepage = "https://github.com/Rafostar/clapper";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ aleksana ];
    platforms = platforms.linux;
  };
})