lix/src/nix
Eelco Dolstra 3c54e9ba01 Add 'nix flake archive' command
This copies a flake and all its inputs recursively to a store (e.g. a
binary cache). This is intended to enable long-term reproducibility
for flakes. However this will also require #3253.

Example:

  $ nix flake archive --json --to file:///tmp/my-cache nixops
  {"path":"/nix/store/272igzkgl1gdzmabsjvb2kb2zqbphb3p-source","inputs":{"nixops-aws":{"path":"/nix/store/ybcykw13gr7iq1pzg18iyibbcv8k9q1v-source","inputs":{}},"nixops-hetzner":{"path":"/nix/store/6yn0205x3nz55w8ms3335p2841javz2d-source","inputs":{}},"nixpkgs":{"path":"/nix/store/li3lkr2ajrzphqqz3jj2avndnyd3i5lc-source","inputs":{}}}}

  $ ll /tmp/my-cache
  total 16
  -rw-r--r-- 1 eelco users 403 Jan 30 01:01 272igzkgl1gdzmabsjvb2kb2zqbphb3p.narinfo
  -rw-r--r-- 1 eelco users 403 Jan 30 01:01 6yn0205x3nz55w8ms3335p2841javz2d.narinfo
  -rw-r--r-- 1 eelco users 408 Jan 30 01:01 li3lkr2ajrzphqqz3jj2avndnyd3i5lc.narinfo
  drwxr-xr-x 2 eelco users   6 Jan 30 01:01 nar
  -rw-r--r-- 1 eelco users  21 Jan 30 01:01 nix-cache-info
  -rw-r--r-- 1 eelco users 404 Jan 30 01:01 ybcykw13gr7iq1pzg18iyibbcv8k9q1v.narinfo

Fixes #3336.
2020-01-30 01:00:34 +01:00
..
add-to-store.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
build.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
cat.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
command.cc Merge remote-tracking branch 'origin/master' into flakes 2019-12-11 14:53:30 +01:00
command.hh Clean up the lock file handling flags 2020-01-29 21:04:28 +01:00
copy.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
doctor.cc nix doctor: Fix typo 2019-12-05 20:40:52 +01:00
dump-path.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
edit.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
eval.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
flake-template.nix Fix attr path to nixpkgs flake in flake template 2019-11-14 23:13:37 +01:00
flake.cc Add 'nix flake archive' command 2020-01-30 01:00:34 +01:00
hash.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
installables.cc Add --update-input flag to update a specific flake input 2020-01-29 23:14:27 +01:00
installables.hh resolveFlake -> lockFlake 2020-01-22 20:59:59 +01:00
legacy.cc Start of new Nix command-line interface 2016-02-09 21:28:29 +01:00
legacy.hh Fix Darwin build 2016-03-15 12:11:27 +01:00
local.mk Merge remote-tracking branch 'origin/master' into flakes 2019-12-11 14:53:30 +01:00
log.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
ls.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
main.cc Fix --refresh with --no-net 2020-01-28 17:34:48 +01:00
make-content-addressable.cc nix make-content-addressable: Add --json flag 2019-12-18 17:39:02 +01:00
optimise-store.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
path-info.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
ping-store.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
profile.cc Pluggable fetchers 2020-01-21 22:56:04 +01:00
progress-bar.cc Fix progress bar 2019-12-14 23:19:04 +01:00
progress-bar.hh nix: Add --print-build-logs flag 2019-05-15 17:33:56 +02:00
repl.cc Merge remote-tracking branch 'origin/master' into flakes 2019-12-11 14:53:30 +01:00
run.cc Merge remote-tracking branch 'origin/master' into flakes 2019-12-11 14:53:30 +01:00
search.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
shell.cc Merge remote-tracking branch 'origin/master' into flakes 2019-12-11 14:53:30 +01:00
show-config.cc Make subcommand construction in MultiCommand lazy 2019-12-05 20:19:26 +01:00
show-derivation.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
sigs.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
upgrade-nix.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
verify.cc Make the Store API more type-safe 2019-12-10 22:06:05 +01:00
why-depends.cc Merge remote-tracking branch 'origin/master' into flakes 2019-12-11 14:53:30 +01:00