Add ALVR packaging

This commit is contained in:
GHOSCHT 2023-12-24 11:17:07 +01:00
parent 68e7208177
commit 85caea0cb3
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
2 changed files with 37 additions and 0 deletions

36
pkgs/alvr/default.nix Normal file
View file

@ -0,0 +1,36 @@
{
lib,
appimageTools,
fetchurl,
}: let
pname = "alvr";
version = "20.5.0";
src = fetchurl {
url = "https://github.com/alvr-org/ALVR/releases/download/v${version}/ALVR-x86_64.AppImage";
hash = "sha256-shA93fK/F+PNRv+DCTfvN+tm0w/sj/yPEYc5ms2vHRk=";
};
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"];
};
}

View file

@ -2,4 +2,5 @@
# You can build them using 'nix build .#example' # You can build them using 'nix build .#example'
pkgs: { pkgs: {
# example = pkgs.callPackage ./example { }; # example = pkgs.callPackage ./example { };
alvr = pkgs.callPackage ./alvr {};
} }