lix/src
Eelco Dolstra 5c97b5a398 InstallableFlake::toDerivedPaths(): Support paths and store paths
This makes 'nix build' work on paths (which will be copied to the
store) and store paths (returned as is). E.g. the following flake
output attributes can be built using 'nix build .#foo':

  foo = ./src;
  foo = self.outPath;
  foo = builtins.fetchTarball { ... };
  foo = (builtins.fetchTree { .. }).outPath;
  foo = builtins.fetchTree { .. } + "/README.md";
  foo = builtins.storePath /nix/store/...;

Note that this is potentially risky, e.g.

  foo = /.;

will cause Nix to try to copy the entire file system to the store.

What doesn't work yet:

  foo = self;
  foo = builtins.fetchTree { .. };

because we don't handle attrsets with an outPath attribute in it yet,
and

  foo = builtins.storePath /nix/store/.../README.md;

since result symlinks have to point to a store path currently (rather
than a file inside a store path).

Fixes #7417.
2022-12-20 15:11:44 +01:00
..
build-remote build-remote: Add brackets to error message 2022-11-04 10:49:44 -07:00
libcmd InstallableFlake::toDerivedPaths(): Support paths and store paths 2022-12-20 15:11:44 +01:00
libexpr EvalState::copyPathToStore(): Return a StorePath 2022-12-20 14:58:39 +01:00
libfetchers Allow to disable global flake-registry with "" 2022-12-12 15:32:02 +01:00
libmain Merge pull request #7421 from edolstra/lazy-trees-trivial-changes 2022-12-12 13:52:56 +01:00
libstore Improve sqlite error messages 2022-12-17 14:51:37 +01:00
libutil Merge pull request #7451 from edolstra/abstract-pos 2022-12-20 12:55:13 +01:00
nix Merge toDerivations() into toDerivedPaths() 2022-12-20 14:24:14 +01:00
nix-build nix-build: remove unused --add-root arg 2022-09-27 00:07:42 +02:00
nix-channel Fix segfault in headerCallback() 2022-03-03 11:11:16 +01:00
nix-collect-garbage Add missing rethrows in conditional exception handlers 2022-06-10 10:52:41 -07:00
nix-copy-closure copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
nix-env Introduce AbstractPos 2022-12-13 00:50:43 +01:00
nix-instantiate Revert to copyStore = true for nix-instantiate and nix-env 2022-08-23 14:40:27 +02:00
nix-store Fix unused variable warning 2022-12-12 16:41:46 +01:00
resolve-system-dependencies Get rid of most .at calls (#6393) 2022-05-04 07:44:32 +02:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00