Skip to content

Consider clearly separating eval-time vs build-time expressions #814

Closed
@michaelpj

Description

@michaelpj

Often we have builds that do some work at eval-time, and some at build-time. This requires some careful managing of evalPackages etc., and getting it wrong leads to issues like that fixed in #810.

Here's a hypothesis: any given derivation will be almost entirely build-time or eval-time, and any eval-time deps will be few enough that they could be passed in specially.

This suggests a way of structuring our expressions: everything uses only an unqualified pkgs, and we select as-late-as-possible whether we instantiate it with buildPackages/evalPackages/whatever.

For example, I think lib/call-cabal-project-to-nix.nix should be run entirely at eval time, and so should just have a single pkgs: the eval packages. However, it in fact gets passed a variety of things from both evalPackages and buildPackages, which frankly seems suspicious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions