41 rustPlatform.buildRustPackage rec {
45 src = fetchFromGitHub {
48 rev = "refs/tags/v${version}";
49 fetchSubmodules = true; #TODO devendor openvr
50 hash = "sha256-zqeh9U0A/KHlRieq9Lf+7f04K3JG/vpE2gZ916ReXLc=";
54 lockFile = ./Cargo.lock;
56 "openxr-0.19.0" = "sha256-bnMSjJh+zjLw4Pdxr7LLm6qYAJOK7hz5xORKZ2pVcGw=";
57 "settings-schema-0.2.0" = "sha256-luEdAKDTq76dMeo5kA+QDTHpRMFUg3n0qvyQ7DkId0k=";
63 src = ./fix-finding-libs.patch;
64 ffmpeg = lib.getDev ffmpeg;
65 x264 = lib.getDev x264;
70 NIX_CFLAGS_COMPILE = toString [
79 RUSTFLAGS = map (a: "-C link-arg=${a}") [
80 "-Wl,--push-state,--no-as-needed"
90 rustPlatform.bindgenHook
127 # Build SteamVR driver ("streamer")
128 cargo xtask build-streamer --release
132 install -Dm755 ${src}/alvr/xtask/resources/alvr.desktop $out/share/applications/alvr.desktop
133 install -Dm644 ${src}/resources/alvr.png $out/share/icons/hicolor/256x256/apps/alvr.png
135 # Install SteamVR driver
136 mkdir -p $out/{libexec,lib/alvr,share}
137 cp -r ./build/alvr_streamer_linux/lib64/. $out/lib
138 cp -r ./build/alvr_streamer_linux/libexec/. $out/libexec
139 cp -r ./build/alvr_streamer_linux/share/. $out/share
140 ln -s $out/lib $out/lib64
143 passthru.updateScript = nix-update-script { };
146 description = "Stream VR games from your PC to your headset via Wi-Fi";
147 homepage = "https://github.com/alvr-org/ALVR/";
148 changelog = "https://github.com/alvr-org/ALVR/releases/tag/v${version}";
149 license = licenses.mit;
150 mainProgram = "alvr_dashboard";
151 maintainers = with maintainers; [ passivelemon ];
152 platforms = platforms.linux;