Update ALVR

This commit is contained in:
Joseph DiGiovanni 2024-08-11 21:01:43 -04:00
parent 5dcbe8b9e8
commit 90d12289c5
3 changed files with 93 additions and 2 deletions

89
custom-pkgs/alvr.nix Normal file
View file

@ -0,0 +1,89 @@
{ lib
, stdenv
, fetchzip
, fetchFromGitHub
, alsa-lib
, autoPatchelfHook
, brotli
, ffmpeg
, libdrm
, libGL
, libunwind
, libva
, libvdpau
, libxkbcommon
, nix-update-script
, openssl
, SDL2
, vulkan-loader
, wayland
, x264
, xorg
}:
stdenv.mkDerivation rec {
pname = "alvr";
version = "20.9.1";
src = fetchzip {
url = "https://github.com/alvr-org/ALVR/releases/download/v${version}/alvr_streamer_linux.tar.gz";
hash = "sha256-S8GeUskAqxzPqKC5XDiRDezV++vestlHLAzK001wkXQ=";
};
alvrSrc = fetchFromGitHub {
owner = "alvr-org";
repo = "ALVR";
rev = "v${version}";
hash = "sha256-kw/UGh9nxZMVnvxyXV4CUm3HZegyjWolNoHHNindc5s=";
};
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
alsa-lib
libunwind
libva
libvdpau
vulkan-loader
SDL2
];
runtimeDependencies = [
brotli
ffmpeg
openssl
libdrm
libGL
libxkbcommon
wayland
x264
xorg.libX11
xorg.libXcursor
xorg.libxcb
xorg.libXi
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/applications
cp -r $src/* $out
install -Dm444 $alvrSrc/alvr/xtask/resources/alvr.desktop -t $out/share/applications
install -Dm444 $alvrSrc/resources/alvr.png -t $out/share/icons/hicolor/256x256/apps
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
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${finalAttrs.version}";
license = licenses.mit;
maintainers = with maintainers; [ passivelemon ];
platforms = platforms.linux;
mainProgram = "alvr_dashboard";
};
}

View file

@ -3,6 +3,7 @@
let
customPkgs = final: prev: with pkgs;{
adwaita-for-steam = callPackage ./adwaita-for-steam.nix { };
alvr = callPackage ./alvr.nix { };
gnomeExtensions = prev.gnomeExtensions // {
monitor-brightness-and-volume = callPackage ./gnomeExtensions/monitor-brightness-and-volume.nix { };
@ -23,6 +24,7 @@ let
godot_4 = final.unstable.godot_4;
icoextract = final.unstable.icoextract; #TODO: remove in next release
proton-ge-bin = final.unstable.proton-ge-bin;
sidequest = final.unstable.sidequest;
unstable = import inputs.nixpkgs-unstable {
inherit (final) config system;

View file

@ -2,7 +2,7 @@
{
home.packages = with pkgs; [
unstable.alvr
unstable.sidequest
alvr
sidequest
];
}