summary refs log tree commit diff
path: root/pkgs/applications/video/clapper/default.nix
blob: 954ea58b4554d5c12295ebff047b2b490d41c2d1 (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
83
84
85
86
{ config
, lib
, stdenv
, fetchFromGitHub
, glib
, gobject-introspection
, python3
, pkg-config
, ninja
, wayland
, wayland-protocols
, desktop-file-utils
, makeWrapper
, shared-mime-info
, wrapGAppsHook4
, meson
, gjs
, gtk4
, gst_all_1
, libGL
, libadwaita
, appstream-glib
, libsoup
}:

stdenv.mkDerivation rec {
  pname = "clapper";
  version = "0.5.2";

  src = fetchFromGitHub {
    owner  = "Rafostar";
    repo   = pname;
    rev    = version;
    sha256 = "sha256-s+qdTq3/pHHstwr1W3Hs2Zje++iJFHM6hQTFoZD43bY=";
  };

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

  buildInputs = [
    gjs
    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
    wayland
    wayland-protocols
  ];

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

  postInstall = ''
    cp ${src}/data/icons/*.svg $out/share/icons/hicolor/scalable/apps/
    cp ${src}/data/icons/*.svg $out/share/icons/hicolor/symbolic/apps/
  '';

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