Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Xonsh #5494

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

WIP: Xonsh #5494

wants to merge 10 commits into from

Conversation

pasqui23
Copy link
Contributor

@pasqui23 pasqui23 commented Jun 3, 2024

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

finalPackage = lib.mkOption {
type = types.package;
internal = true;
description = "Package that will actually gat installed";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "Package that will actually gat installed";
description = "Package that will actually get installed";

Comment on lines 43 to 49
home = {
packages = [ cfg.finalPackage ];
file.".xonshrc" = {
enable = cfg.xonshrc != "";
text = cfg.xonshrc;
};
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to respect XDG.

Suggested change
home = {
packages = [ cfg.finalPackage ];
file.".xonshrc" = {
enable = cfg.xonshrc != "";
text = cfg.xonshrc;
};
};
home.packages = [ cfg.finalPackage ];
xdg.configFile."xonsh/rc.xsh" = {
enable = cfg.xonshrc != "";
text = cfg.xonshrc;
};

Another option is how #5160 does it: split by files. It's directly supported by xonsh.

Which one is better? I don't know, but you and @inmaldrerah should probably join efforts.

Thanks both!

cfg.package.override (old: { inherit (cfg) extraPackages; });
};
};
xdg.configFile."xonsh/rc.xsh" = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This xdg.configFile."xonsh/rc.xsh" entry should be in the previous config block.

@drmikecrowe
Copy link

@pasqui23 -- I'm confused how this PR and NixOS/nixpkgs#241386 will interact. Are you and @greg-hellings communicating? Will these work together?

I want this support in home-manager, but I feel like we need the xontribs to be in nixpkgs, not inline in the home-manager like this.

FWIW, I'm trying to maintain a NUR of the xontribs I find that we can migrate to nixpkgs -- these should be in the PR referenced above

@pasqui23
Copy link
Contributor Author

pasqui23 commented Jul 20, 2024 via email

xonshrc = "xontrib load broot";
extraPackages = ps:
[
(ps.buildPythonPackage {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not the way to do this. I don't know if home-manager allows it, but cramming it in here manually seems less than ideal.

@pasqui23
Copy link
Contributor Author

pasqui23 commented Aug 24, 2024 via email

@pasqui23
Copy link
Contributor Author

Wait now I see it. Yeah I can't seem to make it work unfortunately and NixOS/nixpkgs#241386 doesn't seem to add it in upstream either

@pasqui23 pasqui23 changed the title Xonsh WIP: Xonsh Aug 24, 2024
@pasqui23
Copy link
Contributor Author

pasqui23 commented Aug 24, 2024

Put this as wip until NixOS/nixpkgs#241386 is merged and I can use xonsh-direnv from it

Copy link

stale bot commented Nov 24, 2024

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.

If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

@stale stale bot added the status: stale label Nov 24, 2024
@Infinidoge
Copy link
Contributor

I've made a new PR (shown above) that adds the xontribs. If you all can review it to try and get it merged, that would be appreciated.

@stale stale bot removed the status: stale label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants