nixpkgs/pkgs/by-name/mu/multiviewer-for-f1/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

103 lines
2.0 KiB
Nix
Raw Normal View History

2023-07-13 15:06:43 +00:00
{ 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
2024-11-02 12:08:31 +00:00
id = "203624820";
2023-07-13 15:06:43 +00:00
in
stdenvNoCC.mkDerivation rec {
pname = "multiviewer-for-f1";
2024-11-02 12:08:31 +00:00
version = "1.36.2";
2023-07-13 15:06:43 +00:00
src = fetchurl {
url = "https://releases.multiviewer.dev/download/${id}/multiviewer-for-f1_${version}_amd64.deb";
2024-11-02 12:08:31 +00:00
sha256 = "sha256-b9Sx5Zcn+zQ9yFwrosHp1bTENByhBUU3VJfZA2HPoPU=";
2023-07-13 15:06:43 +00:00
};
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 --enable-wayland-ime=true}}" \
2023-07-13 15:06:43 +00:00
--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";
2023-07-13 15:06:43 +00:00
};
}