Skip to content

Prepend ENV variables #55

@jessevdp

Description

@jessevdp

I find myself in a situation where I'd like to prepend (or append) something to an ENV variable in the wrapper (XDG_CONFIG_DIRS for example). Nix makeWrapper has flags like --prefix VAR SEP VAL to make this pretty seamless.

Is something similar supported for wrapModule?

Right now all I could come up with is something like the following, which feels pretty verbose with all the escaping etc.

env = {
  MY_VAR = "something\${MY_VAR:+:$MY_VAR}";
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions