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

Exposing nix expression AST #1

Closed
costrouc opened this Issue Oct 17, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@costrouc

costrouc commented Oct 17, 2018

I wanted to open an issue to judge what you think about exposing the nix expression AST in pythonix. This package is already great for evaluating expressions and working with the results in python. I would like to add a PR for AST support because this would enable a whole set of tooling to be easily made. For example

  • automate alphabetically sorting packages
  • automate enforcing a code style to expressions
  • could also benefit code editors with handling nix expressions

I have already found that the AST is exposed at https://github.com/NixOS/nix/blob/master/src/libexpr/nixexpr.hh . I will need to have knowledge of interfacing C++ with python for my future job (without using cython) and I think this is a doable project that could provide a lot of benefit.

@Mic92

This comment has been minimized.

Owner

Mic92 commented Oct 17, 2018

Sounds good to me! Go ahead. At the moment we don't provide much benefit over nix eval --json.

@costrouc

This comment has been minimized.

costrouc commented Oct 17, 2018

I will continue the conversation in the new PR when I open it.

@costrouc costrouc closed this Oct 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment