1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 23:28:26 -04:00
nix/src
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
..
build-remote Merge pull request #4477 from NixOS/ca/build-remote 2021-02-26 16:54:44 +01:00
cpptoml
libcmd Split the parsing of an App and its resolving 2021-05-17 17:50:41 +02:00
libexpr Only link with libdl on Linux 2021-06-01 08:05:21 +00:00
libfetchers fix error: 'optional' in namespace 'std' does not name a template type 2021-06-02 18:09:03 +08:00
libmain restoreSignals() + restoreAffinity() -> restoreProcessContext() 2021-04-07 13:10:02 +02:00
libstore Source complete env in nix-shell with __structuredAttrs = true; 2021-06-22 19:15:57 +02:00
libutil Extract a generic computeClosure function 2021-05-19 11:44:58 +02:00
nix Only symlink the requested outputs in nix build 2021-06-21 15:47:47 +02:00
nix-build Source complete env in nix-shell with __structuredAttrs = true; 2021-06-22 19:15:57 +02:00
nix-channel Initialize plugins after handling initial command line flags 2021-02-24 08:22:17 -05:00
nix-collect-garbage Initialize plugins after handling initial command line flags 2021-02-24 08:22:17 -05:00
nix-copy-closure Use RealisedPaths in copyPaths 2021-02-25 17:18:48 +01:00
nix-env Rename Buildable 2021-04-05 09:52:25 -04:00
nix-instantiate Initialize plugins after handling initial command line flags 2021-02-24 08:22:17 -05:00
nix-store Rename Buildable 2021-04-05 09:52:25 -04:00
nlohmann Revert "Use upstream nlohmann_json" 2021-04-05 21:24:55 +01:00
resolve-system-dependencies Fix macOS build 2021-01-21 12:46:22 +01:00