Skip to content

Is in-expression generation possible? #188

Open
@Fuuzetsu

Description

@Fuuzetsu

Currently whenever Cargo.lock changes, developer has to notice and run crate2nix manually.

This is annoying but I can't think of simple way to automate this away that's consistent for developers across. The simplest (but not simple enough) way would be to start some file-watching thing in nix shell hook and run crate2nix when Cargo.lock changes.

For now we'll probably just check in CI that Cargo.nix is up to date but it sucks to have failed CI because there was a manual step one forgot to do.

If it was possible to say something like

cargoNix = crate2nix ./Cargo.lock;

That'd be cool. We let nix deal with re-running crate2nix when lock file changes.

Is this doable in a pure expression (nix flake)? I am guessing that no but I haven't checked through the source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions