nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 pkg-config,
6 meson,
7 cmake,
8 ninja,
9 gst_all_1,
10 wrapQtAppsHook,
11 qtbase,
12 qtmultimedia,
13 layer-shell-qt,
14 wayland-scanner,
15}:
16let
17 gstreamerPath =
18 with gst_all_1;
19 lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
20 gstreamer
21 gst-plugins-base
22 gst-plugins-good
23 gst-plugins-bad
24 gst-plugins-ugly
25 ];
26in
27stdenv.mkDerivation {
28 pname = "qt-video-wlr";
29 version = "2023-07-22";
30
31 src = fetchFromGitHub {
32 owner = "xdavidwu";
33 repo = "qt-video-wlr";
34 rev = "1373c8eeb0a5d867927ba30a9a9bb2d5b0057a87";
35 hash = "sha256-mg0ROD9kV88I5uCm+niAI5tJuhkmYC7Z8dixxrNow4c=";
36 };
37
38 nativeBuildInputs = [
39 pkg-config
40 meson
41 cmake # only used for find layer-shell-qt
42 ninja
43 wrapQtAppsHook
44 wayland-scanner
45 ];
46
47 buildInputs = [
48 qtbase
49 qtmultimedia
50 layer-shell-qt
51 ];
52
53 qtWrapperArgs = [
54 "--prefix PATH : $out/bin/qt-video-wlr"
55 "--prefix GST_PLUGIN_PATH : ${gstreamerPath}"
56 ];
57
58 meta = with lib; {
59 description = "Qt pip-mode-like video player for wlroots-based wayland compositors";
60 mainProgram = "qt-video-wlr";
61 homepage = "https://github.com/xdavidwu/qt-video-wlr";
62 license = licenses.mit;
63 maintainers = with maintainers; [
64 fionera
65 rewine
66 ];
67 platforms = with platforms; linux;
68 };
69}