{ packageOverrides = pkgs: { mpv = let mpv = pkgs.mpv.override { youtubeSupport = true; theoraSupport = true; }; in pkgs.stdenv.mkDerivation { name = "mpv-wrapper"; src = mpv; unpackPhase = "cat"; buildInputs = [ pkgs.makeWrapper pkgs.rsync ]; installPhase = '' mkdir -p $out rsync -a $src/ $out/ chmod o+w $out/bin wrapProgram $out/bin/mpv \ --set JACK_PROMISCUOUS_SERVER 1 \ --run "umask 0" ''; }; }; }