nix-config/pkgs/alvr/default.nix

37 lines
1.2 KiB
Nix
Raw Normal View History

2023-12-24 11:17:07 +01:00
{
lib,
appimageTools,
fetchurl,
}: let
pname = "alvr";
2024-03-05 20:59:44 +01:00
version = "v21.0.0-dev00+nightly.2024.03.03";
2023-12-24 11:17:07 +01:00
src = fetchurl {
2024-03-05 20:59:44 +01:00
url = "https://github.com/alvr-org/ALVR-nightly/releases/download/v21.0.0-dev00%2Bnightly.2024.03.03/ALVR-x86_64.AppImage";
hash = "sha256-DCkx8MHcFEkK/IlxIplOYKEzcBM90GQcuqwaftrEdOs=";
2023-12-24 11:17:07 +01:00
};
appimageContents = appimageTools.extractType2 {inherit pname version src;};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm444 ${appimageContents}/alvr.desktop -t $out/share/applications
substituteInPlace $out/share/applications/alvr.desktop \
--replace 'Exec=alvr_dashboard' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "Stream VR games from your PC to your headset via Wi-Fi";
homepage = "https://github.com/alvr-org/ALVR/";
changelog = "https://github.com/alvr-org/ALVR/releases/tag/v${version}";
license = licenses.mit;
mainProgram = "alvr";
maintainers = with maintainers; [passivelemon];
platforms = ["x86_64-linux"];
};
}