1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 23:28:26 -04:00
nix/src/libstore
Eelco Dolstra 462421d345 Backport libfetchers from the flakes branch
This provides a pluggable mechanism for defining new fetchers. It adds
a builtin function 'fetchTree' that generalizes existing fetchers like
'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a
set of attributes, e.g.

  fetchTree {
    type = "git";
    url = "https://example.org/repo.git";
    ref = "some-branch";
    rev = "abcdef...";
  }

The existing fetchers are just wrappers around this. Note that the
input attributes to fetchTree are the same as flake input
specifications and flake lock file entries.

All fetchers share a common cache stored in
~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching
mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}).

This also adds support for Git worktrees (c169ea5904).
2020-04-07 09:03:14 +02:00
..
builtins
binary-cache-store.cc
binary-cache-store.hh
build.cc
builtins.hh
crypto.cc
crypto.hh
daemon.cc
daemon.hh
derivations.cc Backport libfetchers from the flakes branch 2020-04-07 09:03:14 +02:00
derivations.hh
download.cc Backport libfetchers from the flakes branch 2020-04-07 09:03:14 +02:00
download.hh Backport libfetchers from the flakes branch 2020-04-07 09:03:14 +02:00
export-import.cc
fs-accessor.hh
gc.cc
globals.cc
globals.hh Backport libfetchers from the flakes branch 2020-04-07 09:03:14 +02:00
http-binary-cache-store.cc
legacy-ssh-store.cc
local-binary-cache-store.cc
local-fs-store.cc
local-store.cc
local-store.hh
local.mk
machines.cc
machines.hh
misc.cc
nar-accessor.cc
nar-accessor.hh
nar-info-disk-cache.cc
nar-info-disk-cache.hh
nar-info.cc
nar-info.hh
nix-store.pc.in
optimise-store.cc
parsed-derivations.cc
parsed-derivations.hh
path.cc
path.hh
pathlocks.cc
pathlocks.hh
profiles.cc
profiles.hh
references.cc
references.hh
remote-fs-accessor.cc
remote-fs-accessor.hh
remote-store.cc
remote-store.hh
s3-binary-cache-store.cc
s3-binary-cache-store.hh
s3.hh
sandbox-defaults.sb
sandbox-minimal.sb
sandbox-network.sb
schema.sql
serve-protocol.hh
sqlite.cc
sqlite.hh
ssh-store.cc
ssh.cc
ssh.hh
store-api.cc Backport libfetchers from the flakes branch 2020-04-07 09:03:14 +02:00
store-api.hh Backport libfetchers from the flakes branch 2020-04-07 09:03:14 +02:00
worker-protocol.hh