Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdenv: fix env pass through with structured attrs #334772

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Commits on Aug 15, 2024

  1. stdenv: fix env pass through with structured attrs

    When using structured attributes, `env` attributes must not be
    derivation arguments.
    
    Fixes the following example:
    ```
    let
      drv = stdenv.mkDerivation {
        name = "foo";
        __structuredAttrs = true;
        env.FOO = "foo";
      };
    in
    stdenv.mkDerivation drv.drvAttrs
    ```
    
    Note that passthru takes precedence over env.
    
    ```
    nix-repl> (stdenv.mkDerivation {
                name = "foo";
                env.FOO = "foo";
                passthru.FOO = "bar";
              }).FOO
    "bar"
    ```
    tie committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    f7c973d View commit details
    Browse the repository at this point in the history