rl2009.xml: Mention wrapMpv's new interface#89208
Conversation
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR #1295
|
Can we change the |
|
I won't mind, but I can't find an example I can follow. I mean, I could do this: diff --git i/pkgs/top-level/aliases.nix w/pkgs/top-level/aliases.nix
index ff405131074..f084ab534ba 100644
--- i/pkgs/top-level/aliases.nix
+++ w/pkgs/top-level/aliases.nix
@@ -306,7 +306,9 @@ mapAliases ({
msf = metasploit; # added 2018-04-25
libmsgpack = msgpack; # added 2018-08-17
mssys = ms-sys; # added 2015-12-13
- mpv-with-scripts = throw "Use wrapMpv for editing the environment of mpv"; # added 2012-05-22
+ mpv-with-scripts = lib.warn "Use wrapMpv for editing the environment of mpv" (
+ super.wrapMpv super.mpv-unwrapped { }
+ ); # added 2020-05-22
multipath_tools = multipath-tools; # added 2016-01-21
mupen64plus1_5 = mupen64plus; # added 2016-02-12
mysqlWorkbench = mysql-workbench; # added 2017-01-19But according to my tests, overlays don't apply to it. If we can't find a way to make overlays apply as well, I think this behavior is worse then a harsh |
Instead of manually quoting the strings, use the library function to do it more reliably.
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 03b03ff2a84..b647face390 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -309,7 +309,9 @@ mapAliases ({
msf = metasploit; # added 2018-04-25
libmsgpack = msgpack; # added 2018-08-17
mssys = ms-sys; # added 2015-12-13
- mpv-with-scripts = throw "Use wrapMpv for editing the environment of mpv"; # added 2012-05-22
+ mpv-with-scripts = lib.warn "Use wrapMpv for editing the environment of mpv" (
+ self.wrapMpv self.mpv-unwrapped { }
+ ); # added 2020-05-22
multipath_tools = multipath-tools; # added 2016-01-21
mupen64plus1_5 = mupen64plus; # added 2016-02-12
mysqlWorkbench = mysql-workbench; # added 2017-01-19works just fine for me |
|
@Profpatsch if you'll apply that diff and run: You should be able to get a working mpv wrapper. But if you will add this overlay to your nixpkgs' config: self: super:
{
test-mpv-with-scripts = super.mpv-with-scripts.override {
scripts = [ super.mpvScripts.mpris ];
};
}And run: You should be able to see that: is empty - meaning the |
|
Note that I switched from `super.wrapMpv` to `self.wrapMpv` in my example
above. It applied the override script just fine here.
To be perfectly clear, I don’t think it’s optional that we provide a
backwards-compatible `mpv-with-scripts` symbol. We can’t just make breaking
changes like these if there is a viable migration path.
…On Wed, Jun 10, 2020 at 12:55 PM Doron Behar ***@***.***> wrote:
@Profpatsch <https://github.com/Profpatsch> if you'll apply that diff and
run:
nix-build -A mpv-with-scripts
You should be able to get a working mpv wrapper. But if you will add this
overlay to your nixpkgs' config:
self: super:
{
test-mpv-with-scripts = super.mpv-with-scripts.override {
scripts = [ super.mpvScripts.mpris ];
};
}
And run:
nix-build -A test-mpv-with-scripts
You should be able to see that:
cat result/bin/mpv | grep mpris.so
is empty - meaning the .override wasn't applied.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#89208 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYB5ZVOPNDQBBUWCH7SM23RV5RB3ANCNFSM4NOUK23Q>
.
|
To prevent a breaking change while providing fully backwards compatible interface to mpv-with-scripts, this replaces the harsh error using `mpv-with-scripts` had.
Didn't notice. nice 👍. I've updated the PR to include your diff and my release notes changes rebased on latest master. |
|
LGTM |
|
This broke ofborg eval, fixed in 9de29f6. |
|
This broke umpv: #90549 |
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR nix-community#1295
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR nix-community#1295
The latter has been removed from Nixpkgs. See: - <NixOS/nixpkgs#88620> - <NixOS/nixpkgs#89208> PR nix-community#1295
Motivation for this change
#88620 (comment) cc @Profpatsch .
Things done
I haven't tested the build of the docs and how they look like...
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)