1 { lib, stdenvNoCC, fetchFromGitHub, gitUpdater, ffmpeg }:
3 stdenvNoCC.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "1wn2ngcvn7wcsl3kmj782x5q9130qw951lj6ilrkafp6q6zscpqr";
13 passthru.updateScript = gitUpdater {
19 # reset_rot is only available in ffmpeg 5.0, see 5bcc61ce87922ecccaaa0bd303a7e195929859a8
20 postPatch = lib.optionalString (lib.versionOlder ffmpeg.version "5.0") ''
21 substituteInPlace 360plugin.lua --replace ":reset_rot=1:" ":"
25 mkdir -p $out/share/mpv/scripts
26 cp -r 360plugin.lua $out/share/mpv/scripts/
29 passthru.scriptName = "360plugin.lua";
32 description = "Script for mpv to play VR video with optional saving of head tracking data.";
33 homepage = "https://github.com/dfaker/VR-reversal";
34 license = licenses.unlicense;
35 platforms = platforms.all;
36 maintainers = with maintainers; [ schnusch ];