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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
{ stdenvNoCC
, fetchurl
, lib
, makeWrapper
, autoPatchelfHook
, dpkg
, alsa-lib
, at-spi2-atk
, cairo
, cups
, dbus
, expat
, ffmpeg
, glib
, gtk3
, libdrm
, libudev0-shim
, libxkbcommon
, mesa
, nspr
, nss
, pango
, xorg
}:
let
id = "168727396";
in
stdenvNoCC.mkDerivation rec {
pname = "multiviewer-for-f1";
version = "1.32.1";
src = fetchurl {
url = "https://releases.multiviewer.dev/download/${id}/multiviewer-for-f1_${version}_amd64.deb";
sha256 = "sha256-cnfye5c3+ZYZLjlZ6F4OD90tXhxDbgbNBn98mgmZ+Hs=";
};
nativeBuildInputs = [
dpkg
makeWrapper
autoPatchelfHook
];
buildInputs = [
alsa-lib
at-spi2-atk
cairo
cups
dbus
expat
ffmpeg
glib
gtk3
libdrm
libxkbcommon
mesa
nspr
nss
pango
xorg.libX11
xorg.libXcomposite
xorg.libxcb
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
runHook preUnpack
# The deb file contains a setuid binary, so 'dpkg -x' doesn't work here
dpkg --fsys-tarfile $src | tar --extract
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
mv -t $out/share usr/share/* usr/lib/multiviewer-for-f1
makeWrapper "$out/share/multiviewer-for-f1/MultiViewer for F1" $out/bin/multiviewer-for-f1 \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libudev0-shim ]}:\"$out/share/Multiviewer for F1\""
runHook postInstall
'';
meta = with lib; {
description = "Unofficial desktop client for F1 TV®";
homepage = "https://multiviewer.app";
downloadPage = "https://multiviewer.app/download";
license = licenses.unfree;
maintainers = with maintainers; [ babeuh ];
platforms = [ "x86_64-linux" ];
mainProgram = "multiviewer-for-f1";
};
}
|