Skip to content

flowey: add capability to pass environment variables into the nix shell wrapper#3245

Open
justus-camp-microsoft wants to merge 1 commit intomicrosoft:mainfrom
justus-camp-microsoft:keep_vars
Open

flowey: add capability to pass environment variables into the nix shell wrapper#3245
justus-camp-microsoft wants to merge 1 commit intomicrosoft:mainfrom
justus-camp-microsoft:keep_vars

Conversation

@justus-camp-microsoft
Copy link
Copy Markdown
Contributor

By default, Nix won't pass any environment variables through to wrapped commands. There's an internal use-case for this, but in general this is a nice escape hatch to have.

Copilot AI review requested due to automatic review settings April 10, 2026 20:53
@justus-camp-microsoft justus-camp-microsoft requested a review from a team as a code owner April 10, 2026 20:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an escape hatch for Flowey’s nix-shell --pure --run command wrapper so callers can preserve selected environment variables inside the pure nix-shell environment.

Changes:

  • Extend CommandWrapperKind::NixShell with a keep_vars list to pass through env vars via nix-shell --keep.
  • Update the reproducible-build pipeline job to specify the new field (currently empty).
  • Add/adjust unit tests to cover the new wrapper rendering behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
flowey/flowey_hvlite/src/pipelines/build_reproducible.rs Updates nix-shell wrapper configuration to include the new keep_vars field.
flowey/flowey_core/src/shell.rs Adds keep_vars to the serialized nix-shell wrapper and applies --keep args; expands wrapper display tests.

Comment thread flowey/flowey_core/src/shell.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants