lix/tests/flakes
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
..
absolute-paths.sh Trivial changes from the lazy-trees branch 2022-12-07 14:06:34 +01:00
build-paths.sh InstallableFlake::toDerivedPaths(): Support paths and store paths 2022-12-20 15:11:44 +01:00
bundle.sh Move the 'nix bundle' tests 2022-07-13 20:49:07 +02:00
check.sh Split off 'nix flake check' tests 2022-07-13 21:01:16 +02:00
circular.sh Split off the circular flake import tests 2022-07-13 20:37:32 +02:00
common.sh Split off 'nix flake init' tests 2022-07-13 20:37:40 +02:00
config.sh Move flake-local-settings.sh 2022-07-13 20:51:28 +02:00
flakes.sh Allow to disable global flake-registry with "" 2022-12-12 15:32:02 +01:00
follow-paths.sh Revert "Merge pull request #6621 from Kha/nested-follows" 2022-09-01 15:26:19 +02:00
init.sh Split off 'nix flake init' tests 2022-07-13 20:37:40 +02:00
mercurial.sh Split off the Mercurial flake tests 2022-07-13 15:06:57 +02:00
run.sh Move flakes tests to a subdirectory 2022-07-13 15:06:54 +02:00
search-root.sh Move flake-searching.sh and make it less dependent on git 2022-07-13 20:55:17 +02:00
unlocked-override.sh Trivial changes from the lazy-trees branch 2022-12-07 14:06:34 +01:00