mirror of
				https://github.com/materusPL/Nixerus.git
				synced 2025-11-03 22:20:27 +01:00 
			
		
		
		
	alvr: add desktop file and icon
This commit is contained in:
		
							parent
							
								
									e607862c7b
								
							
						
					
					
						commit
						b27a11bb37
					
				
							
								
								
									
										13
									
								
								pkgs/apps/games/alvr/alvr.desktop
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								pkgs/apps/games/alvr/alvr.desktop
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					[Desktop Entry]
 | 
				
			||||||
 | 
					Version=1.0
 | 
				
			||||||
 | 
					Type=Application
 | 
				
			||||||
 | 
					Name=ALVR
 | 
				
			||||||
 | 
					GenericName=Game
 | 
				
			||||||
 | 
					Comment=ALVR is an open source remote VR display which allows playing SteamVR games on a standalone headset such as Gear VR or Oculus Go/Quest.
 | 
				
			||||||
 | 
					Exec=alvr_dashboard
 | 
				
			||||||
 | 
					Icon=alvr
 | 
				
			||||||
 | 
					Categories=Game;
 | 
				
			||||||
 | 
					StartupNotify=true
 | 
				
			||||||
 | 
					PrefersNonDefaultGPU=true
 | 
				
			||||||
 | 
					X-KDE-RunOnDiscreteGpu=true
 | 
				
			||||||
 | 
					StartupWMClass=ALVR
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								pkgs/apps/games/alvr/alvr.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								pkgs/apps/games/alvr/alvr.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 73 KiB  | 
@ -1,4 +1,4 @@
 | 
				
			|||||||
{ stdenv, fetchzip, lib, alsa-lib, gtk3, libunwind, x264, vulkan-loader, xorg, libva, libdrm, libvdpau, libbsd, libmd, xz }:
 | 
					{ stdenv, fetchzip, fetchurl, lib, alsa-lib, gtk3, libunwind, x264, vulkan-loader, xorg, libva, libdrm, libvdpau, libbsd, libmd, xz }:
 | 
				
			||||||
stdenv.mkDerivation rec {
 | 
					stdenv.mkDerivation rec {
 | 
				
			||||||
  pname = "alvr";
 | 
					  pname = "alvr";
 | 
				
			||||||
  version = "v20.4.3";
 | 
					  version = "v20.4.3";
 | 
				
			||||||
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sourceRoot = ".";
 | 
					  sourceRoot = ".";
 | 
				
			||||||
  outputs = [ "out" "driver" ];
 | 
					
 | 
				
			||||||
  rpath = lib.makeLibraryPath [
 | 
					  rpath = lib.makeLibraryPath [
 | 
				
			||||||
    stdenv.cc.cc.lib
 | 
					    stdenv.cc.cc.lib
 | 
				
			||||||
    alsa-lib
 | 
					    alsa-lib
 | 
				
			||||||
@ -29,32 +29,35 @@ stdenv.mkDerivation rec {
 | 
				
			|||||||
    libmd
 | 
					    libmd
 | 
				
			||||||
    xz
 | 
					    xz
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  preferLocalBuild = true;
 | 
					  preferLocalBuild = true;
 | 
				
			||||||
 | 
					  dontBuild = true;
 | 
				
			||||||
  installPhase = ''
 | 
					  installPhase = ''
 | 
				
			||||||
    mkdir -p $out/bin $out/share/alvr
 | 
					    runHook preInstall
 | 
				
			||||||
    mkdir -p $driver/share/vulkan/explicit_layer.d
 | 
					 | 
				
			||||||
    mv ${src.name}/* $out/share/alvr
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ln -s $out/share/alvr/bin/alvr_dashboard $out/bin 
 | 
					    mkdir -p $out/bin $out/opt/ALVR $out/share/vulkan/explicit_layer.d $out/share/applications/ $out/share/icons/hicolor/256x256/apps/
 | 
				
			||||||
 | 
					    mv ${src.name}/* $out/opt/ALVR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Driver
 | 
					    cp ${./alvr.png} $out/share/icons/hicolor/256x256/apps/alvr.png
 | 
				
			||||||
    ln -s $out/share/alvr/share/vulkan/explicit_layer.d/alvr_x86_64.json $driver/share/vulkan/explicit_layer.d/alvr_x86_64.json
 | 
					    cp ${./alvr.desktop} $out/share/applications/alvr.desktop
 | 
				
			||||||
    ln -s $out/share/alvr/lib64 $driver/lib
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ln -s $out/opt/ALVR/bin/alvr_dashboard $out/bin 
 | 
				
			||||||
 | 
					    ln -s $out/opt/ALVR/share/vulkan/explicit_layer.d/alvr_x86_64.json $out/share/vulkan/explicit_layer.d
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ls -la $out/share/alvr
 | 
					    runHook postInstall
 | 
				
			||||||
 | 
					 | 
				
			||||||
  '';
 | 
					  '';
 | 
				
			||||||
  fixupPhase = ''
 | 
					  fixupPhase = ''
 | 
				
			||||||
    patchelf --set-rpath "${rpath}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/alvr/bin/alvr_dashboard
 | 
					    runHook preFixup
 | 
				
			||||||
    patchelf --set-rpath "${rpath}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/alvr/libexec/alvr/vrcompositor-wrapper
 | 
					 | 
				
			||||||
    patchelf --set-rpath "${rpath}" $out/share/alvr/libexec/alvr/alvr_drm_lease_shim.so
 | 
					 | 
				
			||||||
    patchelf --set-rpath "${rpath}" $out/share/alvr/lib64/libalvr_vulkan_layer.so
 | 
					 | 
				
			||||||
    patchelf --set-rpath "${rpath}" $out/share/alvr/lib64/alvr/bin/linux64/driver_alvr_server.so
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    patchelf --set-rpath "${rpath}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/ALVR/bin/alvr_dashboard
 | 
				
			||||||
 | 
					    patchelf --set-rpath "${rpath}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/ALVR/libexec/alvr/vrcompositor-wrapper
 | 
				
			||||||
 | 
					    patchelf --set-rpath "${rpath}" $out/opt/ALVR/libexec/alvr/alvr_drm_lease_shim.so
 | 
				
			||||||
 | 
					    patchelf --set-rpath "${rpath}" $out/opt/ALVR/lib64/libalvr_vulkan_layer.so
 | 
				
			||||||
 | 
					    patchelf --set-rpath "${rpath}" $out/opt/ALVR/lib64/alvr/bin/linux64/driver_alvr_server.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sed -i "s#../../../lib64/libalvr_vulkan_layer.so#$out/share/alvr/lib64/libalvr_vulkan_layer.so#" $out/share/alvr/share/vulkan/explicit_layer.d/alvr_x86_64.json
 | 
					    sed -i "s#../../../lib64/libalvr_vulkan_layer.so#$out/opt/ALVR/lib64/libalvr_vulkan_layer.so#" $out/opt/ALVR/share/vulkan/explicit_layer.d/alvr_x86_64.json
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    runHook postFixup
 | 
				
			||||||
  '';
 | 
					  '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  meta = with lib; {
 | 
					  meta = with lib; {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user