lix/src/libstore/build
Maximilian Bosch 3b5429aec1
Source complete env in nix-shell with __structuredAttrs = true;
This is needed to push the adoption of structured attrs[1] forward. It's
now checked if a `__json` exists in the environment-map of the derivation
to be openend in a `nix-shell`.

Derivations with structured attributes enabled also make use of a file
named `.attrs.json` containing every environment variable represented as
JSON which is useful for e.g. `exportReferencesGraph`[2]. To
provide an environment similar to the build sandbox, `nix-shell` now
adds a `.attrs.json` to `cwd` (which is mostly equal to the one in the
build sandbox) and removes it using an exit hook when closing the shell.

To avoid leaking internals of the build-process to the `nix-shell`, the
entire logic to generate JSON and shell code for structured attrs was
moved into the `ParsedDerivation` class.

[1] https://nixos.mayflower.consulting/blog/2020/01/20/structured-attrs/
[2] https://nixos.org/manual/nix/unstable/expressions/advanced-attributes.html#advanced-attributes
2021-06-22 19:15:57 +02:00
..
derivation-goal.cc Source complete env in nix-shell with __structuredAttrs = true; 2021-06-22 19:15:57 +02:00
derivation-goal.hh Properly sign the unresolved drvs 2021-03-15 16:35:17 +01:00
drv-output-substitution-goal.cc Allow substituting drv outputs when building 2021-03-01 14:00:17 +01:00
drv-output-substitution-goal.hh Allow substituting drv outputs when building 2021-03-01 14:00:17 +01:00
entry-points.cc Rename Buildable 2021-04-05 09:52:25 -04:00
goal.cc PathSubstitutionGoal: Clean up pipe 2021-04-07 12:21:31 +02:00
goal.hh PathSubstitutionGoal: Clean up pipe 2021-04-07 12:21:31 +02:00
hook-instance.cc Change .cc files to use split build headers 2020-10-12 17:08:52 +00:00
hook-instance.hh Trim hook-instance.hh 2020-10-12 17:16:13 +00:00
local-derivation-goal.cc Source complete env in nix-shell with __structuredAttrs = true; 2021-06-22 19:15:57 +02:00
local-derivation-goal.hh Rename Buildable 2021-04-05 09:52:25 -04:00
substitution-goal.cc PathSubstitutionGoal: Clean up pipe 2021-04-07 12:21:31 +02:00
substitution-goal.hh PathSubstitutionGoal: Clean up pipe 2021-04-07 12:21:31 +02:00
worker.cc PathSubstitutionGoal: Clean up pipe 2021-04-07 12:21:31 +02:00
worker.hh Allow substituting drv outputs when building 2021-03-01 14:00:17 +01:00