Skip to content

dev-shell does not work with __structuredAttrs #3540

@PkmX

Description

@PkmX
derivation {
  name = "test";
  builder = "/usr/bin/bash";
  __structuredAttrs = true;
  system = builtins.currentSystem;
}
$ nix dev-shell '(import ./test.nix)' --option sandbox false
builder for '/nix/store/vaqkx2abjq2yynw3fbf8y3193lpb5kq2--env.drv' failed with exit code 1; last 1 log lines:
  bash: $out: ambiguous redirect

This seems to be related to #3525, since that is the error message you get if you try to redirect to a non-existent variable $out. The dev environment needs to source .attrs.sh first and then redirects to ${outputs[out]}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions