MPV: Difference between revisions
imported>Samuelgrf Finding packages using nix search is better than relying on shell completion, which doesn't always work. |
imported>Samuelgrf Edit examples to use overlays, since packageOverrides are deprecated. |
||
Line 6: | Line 6: | ||
{{ic|mpv-with-scripts}} is a wrapper for the {{ic|mpv}} binary which adds {{ic|--script<nowiki>=</nowiki>}} arguments according to the scripts the wrapper was built with. | {{ic|mpv-with-scripts}} is a wrapper for the {{ic|mpv}} binary which adds {{ic|--script<nowiki>=</nowiki>}} arguments according to the scripts the wrapper was built with. | ||
If you'd like to add scripts to your {{ic|mpv}} wrapper, you'll need to | If you'd like to add scripts to your {{ic|mpv}} wrapper, you'll need to create an overlay in {{ic|~/.config/nixpkgs/config.nix}} or {{ic|/etc/nixos/configuration.nix}} (if you are using NixOS): | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
nixpkgs.overlays = [ | |||
(self: super: { | |||
mpv | mpv = super.mpv-with-scripts.override { | ||
scripts = [ | scripts = [ self.mpvScripts.<your choice> ]; | ||
}; | }; | ||
}; | }) | ||
]; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 26: | Line 26: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
{ | { | ||
nixpkgs.overlays = [ | |||
(self: super: { | |||
mpv = super.mpv-with-scripts.override { | |||
} | scripts = [ self.mpvScripts.mpris ]; | ||
}; | |||
}) | |||
]; | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |