MPV: Difference between revisions
imported>Doronbehar m Remove unused headline at end |
imported>Samuelgrf Finding packages using nix search is better than relying on shell completion, which doesn't always work. |
||
Line 18: | Line 18: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
All of the scripts for MPV can be found under the {{ic|mpvScripts}} attribute. | All of the scripts for MPV can be found under the {{ic|mpvScripts}} attribute. You can search for them by running {{ic|nix search mpvScripts}}. The scripts are defined in the following Nixpkgs directory: | ||
[https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts {{ic|pkgs/applications/video/mpv/scripts}}] | [https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/video/mpv/scripts {{ic|pkgs/applications/video/mpv/scripts}}] |
Revision as of 10:36, 4 July 2020
There are 2 packages that provide an mpv
executable:
mpv
mpv-with-scripts
mpv-with-scripts
is a wrapper for the mpv
binary which adds --script=
arguments according to the scripts the wrapper was built with.
If you'd like to add scripts to your mpv
wrapper, you'll need to override the package in ~/.config/nixpkgs/config.nix
:
{
packageOverrides = pkgs: with pkgs; rec {
mpv-with-scripts = pkgs.mpv-with-scripts.override {
scripts = [pkgs.mpvScripts.<your choice>];
};
};
}
All of the scripts for MPV can be found under the mpvScripts
attribute. You can search for them by running nix search mpvScripts
. The scripts are defined in the following Nixpkgs directory:
pkgs/applications/video/mpv/scripts
So for example, for adding the MPRIS MPV script, use the following in your ~/.config/nixpkgs/config.nix
:
{
packageOverrides = pkgs: with pkgs; rec {
mpv-with-scripts = pkgs.mpv-with-scripts.override {
scripts = [pkgs.mpvScripts.mpris];
};
};
}