nix-gh/src/nix
Eelco Dolstra a9cbd67f90 Add "nix mount-store" command
This mounts an arbitrary Nix store on the specified mount point.

Typical usage:

  $ /nix/store/d0am5d8gwh2kfdcgyxh4y684mb5b2v54-blender-2.79/bin/blender --version
  bash: /nix/store/d0am5d8gwh2kfdcgyxh4y684mb5b2v54-blender-2.79/bin/blender: No such file or directory

  $ nix mount-store /tmp/mp --store https://cache.nixos.org?local-nar-cache=/tmp/nars

  $ unshare -m -r

  $ mount -o bind /tmp/mp /nix/store

  $ /nix/store/d0am5d8gwh2kfdcgyxh4y684mb5b2v54-blender-2.79/bin/blender --version
  [after a lot of downloading...]
  Blender 2.79 (sub 0)

One application is to replace the current remote store file access in
hydra-server implemented via "nix {cat,ls}-store", which doesn't work
all that well (e.g. it doesn't resolve symlinks properly).

Another application would be on-demand fetching of build inputs on
Hydra build slaves (to speed up builds that don't access their entire
closure). However, that will require a lot more machinery.
2017-12-22 00:24:43 +01:00
..
add-to-store.cc Add "nix add-to-store" command 2017-09-14 13:29:33 +02:00
build.cc Add "nix add-to-store" command 2017-09-14 13:29:33 +02:00
cat.cc Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
command.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
command.hh Fix forward-decl of Bindings as "class", match definition. 2017-12-11 11:51:55 -06:00
copy.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
dump-path.cc nix dump-path: Add 2017-05-04 14:21:22 +02:00
edit.cc edit: Catch stoi exceptions from line number parsing 2017-12-14 19:11:56 -05:00
eval.cc nix eval --raw: Use coerceToString() 2017-11-20 18:27:29 +01:00
hash.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
installables.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02: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 Add "nix mount-store" command 2017-12-22 00:24:43 +01:00
log.cc nix log: Add examples 2017-09-07 20:18:29 +02:00
ls.cc nix ls-{nar,store} --json: Respect -R 2017-11-14 14:31:38 +01:00
main.cc Make config options available to legacy commands 2017-11-14 14:04:09 +01:00
mount.cc Add "nix mount-store" command 2017-12-22 00:24:43 +01:00
optimise-store.cc nix optimise-store: Add 2017-08-16 20:56:03 +02:00
path-info.cc Don't indent JSON output 2017-11-14 14:28:03 +01:00
progress-bar.cc More progress indicator improvements 2017-10-24 15:32:38 +02:00
progress-bar.hh nix run: Flush the progress bar before starting the command 2017-08-29 15:13:30 +02:00
repl.cc no "linenoiseFree" in linenoise-ng 2017-11-27 18:30:05 -06:00
run.cc nix run: Fix "flag '--command' requires 2 argument(s)" 2017-11-20 18:07:58 +01:00
search.cc Fix #1635. 2017-12-04 13:19:16 +01:00
show-config.cc Don't indent JSON output 2017-11-14 14:28:03 +01:00
show-derivation.cc Add "nix show-derivation" 2017-09-25 13:43:35 +02:00
sigs.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
verify.cc nix: Respect -I, --arg, --argstr 2017-10-24 12:58:34 +02:00
why-depends.cc nix why-depends: Write to stdout 2017-09-25 16:59:16 +02:00