Skip to content

Idea for pure flakes #1764

@yajo

Description

@yajo

I'm being affected by DeterminateSystems/flakehub-push#170.

Of course that's not devenv's fault. However, it made me wonder: why do we need a static value? This is how it's defined:

root = lib.mkOption {
type = types.str;
internal = true;
default = builtins.getEnv "PWD";
};

We can learn from other projects.

devshell uses environmental values from nix shell or direnv if available, and otherwise allows to provide a fallback script that can apply any custom logic that sets their PRJ_ROOT variable.

dream2nix allows setting path.projectRootFile, so that the script traverses the file tree up to finding this file, to find what is considered the project root.

That should let devenv flakes be evaluated purely, while still having a working dev shell with direnv, nix-shell or nix develop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions