lix/src/libexpr/primops
Eelco Dolstra 90fe1dfd2f Register flake source trees as GC roots
This ensures that flakes don't get garbage-collected, which is
important to get nix-channel-like behaviour.

For example, running

  $ nix build hydra:

will create a GC root

  ~/.cache/nix/flake-closures/hydra -> /nix/store/xarfiqcwa4w8r4qpz1a769xxs8c3phgn-flake-closure

where the contents/references of the linked file in the store are the
flake source trees used by the 'hydra' flake:

  /nix/store/n6d5f5lkpfjbmkyby0nlg8y1wbkmbc7i-source
  /nix/store/vbkg4zy1qd29fnhflsv9k2j9jnbqd5m2-source
  /nix/store/z46xni7d47s5wk694359mq9ay353ar94-source

Note that this in itself is not enough to allow offline use; the
fetcher for the flakeref (e.g. fetchGit or downloadCached) must not
fail if it cannot fetch the latest version of the file, so long as it
knows a cached version.

Issue #2868.
2019-05-23 23:53:25 +02:00
..
context.cc Add builtins.appendContext. 2019-01-31 08:52:23 -05:00
fetchGit.cc fetchGit: Don't barf if we can't update our Git clone 2019-05-23 23:38:40 +02:00
fetchGit.hh fetchGit: Return revCount for dirty working trees 2019-04-19 14:15:51 +02:00
fetchMercurial.cc Make flakes work with 'nix build --store ...' 2019-05-15 15:38:24 +02:00
flake.cc Prevent the global registry from being GC'ed 2019-05-22 23:43:58 +02:00
flake.hh Register flake source trees as GC roots 2019-05-23 23:53:25 +02:00
flakeref.cc FlakeRef::to_string(): Check round trip 2019-05-23 23:39:58 +02:00
flakeref.hh WIP: still need to adapt flakeref parsing 2019-05-01 12:59:12 +02:00
fromTOML.cc Fix build on 32-bit systems and macOS 2018-07-11 21:12:18 +02:00