@@ -0,0 +1,85 @@
1+{ config
2+, lib
3+, stdenv
4+, fetchFromGitHub
5+, glib
6+, gobject-introspection
7+, python3
8+, pkg-config
9+, ninja
10+, wayland
11+, wayland-protocols
12+, desktop-file-utils
13+, makeWrapper
14+, shared-mime-info
15+, wrapGAppsHook
16+, meson
17+, gjs
18+, gtk4
19+, gst_all_1
20+, libadwaita
21+}:
22+
23+stdenv.mkDerivation rec {
24+ pname = "clapper";
25+ version = "0.4.0";
26+
27+ src = fetchFromGitHub {
28+ owner = "Rafostar";
29+ repo = pname;
30+ rev = version;
31+ sha256 = "1gf4z9lib5rxi1xilkxxyywakm9zlq5915w2wib09jyh0if82ahr";
32+ };
33+
34+ nativeBuildInputs = [
35+ desktop-file-utils # for update-desktop-database
36+ glib
37+ gobject-introspection
38+ meson
39+ ninja
40+ makeWrapper
41+ pkg-config
42+ python3
43+ shared-mime-info # for update-mime-database
44+ wrapGAppsHook # for gsettings
45+ ];
46+
47+ buildInputs = [
48+ gjs
49+ gst_all_1.gstreamer
50+ gst_all_1.gst-plugins-base
51+ gst_all_1.gst-plugins-good
52+ gst_all_1.gst-plugins-bad
53+ gst_all_1.gst-plugins-ugly
54+ gtk4
55+ libadwaita
56+ wayland
57+ wayland-protocols
58+ ];
59+
60+ postPatch = ''
61+ patchShebangs build-aux/meson/postinstall.py
62+ '';
63+
64+ mesonFlags = [
65+ # TODO: https://github.com/NixOS/nixpkgs/issues/36468
66+ "-Dc_args=-I${glib.dev}/include/gio-unix-2.0"
67+ ];
68+
69+ postInstall = ''
70+ cp ${src}/data/icons/*.svg $out/share/icons/hicolor/scalable/apps/
71+ cp ${src}/data/icons/*.svg $out/share/icons/hicolor/symbolic/apps/
72+ '';
73+
74+ meta = with lib; {
75+ description = "A GNOME media player built using GJS with GTK4 toolkit and powered by GStreamer with OpenGL rendering. ";
76+ longDescription = ''
77+ Clapper is a GNOME media player build using GJS with GTK4 toolkit.
78+ The media player is using GStreamer as a media backend and renders everything via OpenGL.
79+ '';
80+ homepage = "https://github.com/Rafostar/clapper";
81+ license = licenses.gpl3Plus;
82+ maintainers = with maintainers; [ tomfitzhenry ];
83+ platforms = platforms.linux;
84+ };
85+}