Skip to content

Implement Nix JSON RPC interface #8726

Description

@gytis-ivaskevicius

Is your feature request related to a problem? Please describe.
I would like for it to be easier to integrate with nix

Describe the solution you'd like
Nix JSON RPC (or similar) interface

Describe alternatives you've considered
Currently, I am executing nix commands, in some cases I am forced to parse text (like to figure out if the derivation is uncached I do nix-store --realise --try-run <drv>)

Additional context
Expected features:

  • More or less whole nix CLI functionality to be to be available via JSON
  • Every JSON request should result in async event stream of which files have been evaluated, which derivations have been built during eval/build time, which derivations have been fetched
  • Not necessary but it would be great to have daemon mode to reuse eval cache and nix binary querying cache (like which derivations have not been found)

Future work
I think It would be a good idea to separate nix and CLI. And if we ever have that - it would be cool to have Nix CLI download Nix based on whatever is pinned in flake.lock thus further reducing impurities

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions