Repository navigation
xonsh: fix wrapper, 0.17.0 -> 0.18.2 - #325813
Conversation
greg-hellings
left a comment
There was a problem hiding this comment.
OK, so the basic package name is going back to the wrapper and the unwrapped is coming back. 👍
| }; | ||
| }; | ||
| in | ||
| pythonPackages.buildPythonPackage argset |
There was a problem hiding this comment.
why the let-in instead of defining it directly?
There was a problem hiding this comment.
Anderson has explained it in #305316 (comment), and I didn't change it.
Co-authored-by: éclairevoyant <[email protected]>
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
I'm going to update xonsh to 0.18.2 in this PR, because it is not merged for too long, and I don't want to open a separate PR for update and rebase this one. Drafting until it is done. |
|
So I have a question about the new wrapper: how do you make a dev shell that has a custom Python environment that also works when you run |
Good question. I didn't think of this use case, but adding the unwrapped xonsh to a python env actually works, because creating a python env effectively wraps it. { pkgs ? import <nixpkgs> {} }:
let
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
requests
xonsh
]);
in
pkgs.mkShell {
packages = [ pythonEnv ];
}This is exactly how the wrapper works, except the wrapper is a proper shell package and only exposes xonsh itself. I've updated the description of changes. |
greg-hellings
left a comment
There was a problem hiding this comment.
This, at last, resolves basically all the outstanding difficulties I've been having with Xonsh. Please merge this ASAP.
Description of changes
Reverting the breaking change of top-level xonsh package introduced by #314728, and restore the previous wrapper behavior.
Fixes #248978
Fixes #326339
Note: The fix makes the
xonshexecutables in the unwrapped variants unusable without a python env, so either add it to a python env or use the wrapper instead. To use another Python version (e.g. avoid the f-string regression xonsh/xonsh#5166), override thepython3used by top-levelxonsh, likepkgs.xonsh.override { python3 = pkgs.python311; }.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.