Skip to content

C API: Flakes, locking, override-input #10435

@roberth

Description

@roberth

Is your feature request related to a problem? Please describe.

Currently flakes are accessible via builtins.getFlake (when the flag is enabled of course), but functionality that is expected from any flakes-supporting CLI will include at least:

  • --override-input and
  • automatically updating the lock file despite pure mode.

Describe the solution you'd like

At least one of

  • A CLI oriented helper struct that performs these tasks and returns a struct with access to the outputs value and/or eval cache
  • A perhaps slightly more flexible/low level set of functions that manipulate the lock and can evaluate a flake with it
  • Both
    • a C function that returns a "locked" flake regardless of pure mode.
    • Nix-language support for overriding flake inputs

Additional context

#8699

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c apiNix as a C library with a stable interfacefeatureFeature request or proposalflakes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions