This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.mpv: convert to use makeWrapper with flagSeparator

Replace writeShellApplication with makeWrapper using flagSeparator="="
to generate the --flag=value format that mpv requires

+14 -22
+14 -22
tools/mpv/flake-module.nix
··· 1 1 { self, ... }: 2 2 { 3 3 perSystem = 4 - { pkgs, ... }: 4 + { pkgs, system, ... }: 5 5 { 6 6 packages.mpv = 7 7 let ··· 65 65 }; 66 66 67 67 in 68 - pkgs.writeShellApplication { 69 - name = "mpv"; 70 - runtimeInputs = [ 71 - mpvPackage 72 - pkgs.yt-dlp 73 - ]; 74 - text = '' 75 - Y_RES=1081 76 - # we need to disable sponsorblock local database because of 77 - # https://github.com/po5/mpv_sponsorblock/issues/31 78 - exec mpv \ 79 - --no-config \ 80 - --input-conf=${mpvInput} \ 81 - --include=${mpvConfig} \ 82 - --script=${autosub} \ 83 - --ytdl-format="best[height<$Y_RES]" \ 84 - --script-opts=ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp \ 85 - --script-opts-append=sponsorblock-local_database=no \ 86 - --audio-channels=2 \ 87 - "$@" 88 - ''; 68 + self.libWithPkgs.${system}.makeWrapper mpvPackage { 69 + runtimeInputs = [ pkgs.yt-dlp ]; 70 + flagSeparator = "="; 71 + flags = { 72 + "--no-config" = {}; 73 + "--input-conf" = "${mpvInput}"; 74 + "--include" = "${mpvConfig}"; 75 + "--script" = "${autosub}"; 76 + "--ytdl-format" = "best[height<1081]"; 77 + "--script-opts" = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp"; 78 + "--script-opts-append" = "sponsorblock-local_database=no"; 79 + "--audio-channels" = "2"; 80 + }; 89 81 }; 90 82 91 83 # Separate package for subtitle downloader