Mpv-with-scripts has been renamed


I got this message after switching to a newer nixpkgs version (79d3ca08920364759c63fd3eb562e99c0c17044a 2022-09-25)

error: 'mpv-with-scripts' has been renamed to/replaced by 'self.wrapMpv'

I’m quite puzzled by this message, should I use wrapMpv instead of mpv-with-scripts? That’s super weird, and I think this kind of message should be improved… Or the new package name changed.


@Solene can you provide steps to reproduce ?

It comes from Prune old aliases by mweinelt · Pull Request #192681 · NixOS/nixpkgs · GitHub. And yeah, it is not a simple replacement so the instructions should include that instead of override, you need to pass the arguments directly.

here it is :slight_smile: with nixpkgs 79d3ca08920364759c63fd3eb562e99c0c17044a

environment.systemPackages = with pkgs; [

I don’t really understand how to figure the new value I should use :frowning:

The old alias was mpv-with-scripts = self.wrapMpv self.mpv-unwrapped { }; So you can just use (wrapMpv mpv-unwrapped { }).

I guess previously it was meant to be used as (mpv-with-scripts.override { scripts = [ … ]; }) but now you are supposed to do (wrapMpv mpv-unwrapped { scripts = [ … ]; }).

But since you do not pass any scripts, you should be able to just use mpv directly:

Would be nice if you could correct the error message, if you feel like it:

1 Like

I don’t really remember why I needed mpv-with-scripts, I thought it was to have hosting video services support, but it works fine with mpv package.

Thanks for clarification! I’m not sure how to improve the error message though.

Might have been in the past.

Since the old mpv-with-scripts alias was the same as the mpv attribute in all-packages.nix is now, recommending to replace it with mpv will probably be safe.

1 Like

I guess that MPV - NixOS Wiki should be edited.

1 Like