1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/src/libfetchers
Tony Olagbaiye 5b8c1deb18 fetchTree: Allow fetching plain files
Add a new `file` fetcher type, which will fetch a plain file over
http(s), or from the local file.

Because plain `http(s)://` or `file://` urls can already correspond to
`tarball` inputs (if the path ends-up with a know archive extension),
the URL parsing logic is a bit convuluted in that:

- {http,https,file}:// urls will be interpreted as either a tarball or a
  file input, depending on the extensions of the path part (so
  `https://foo.com/bar` will be a `file` input and
  `https://foo.com/bar.tar.gz` as a `tarball` input)
- `file+{something}://` urls will be interpreted as `file` urls (with
  the `file+` part removed)
- `tarball+{something}://` urls will be interpreted as `tarball` urls (with
  the `tarball+` part removed)

Fix #3785

Co-Authored-By: Tony Olagbaiye <me@fron.io>
2022-05-19 18:24:49 +02:00
..
attrs.cc Fix conversion from JSON to fetch attributes 2021-01-05 02:06:25 +00:00
attrs.hh fix error: 'optional' in namespace 'std' does not name a template type 2021-06-02 18:09:03 +08:00
cache.cc libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
cache.hh libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
fetch-settings.cc Move some stuff from Settings to a new FetchSettings. 2022-03-01 01:39:25 +00:00
fetch-settings.hh Point to new github oauth docs url 2022-03-06 17:01:14 -06:00
fetchers.cc don't assume that rev is a SHA1 hash 2022-04-07 19:49:47 +02:00
fetchers.hh libfetchers: Rename immutable -> locked 2022-02-24 18:09:00 +01:00
git.cc Fix the parsing of the sourcehut refs file 2022-05-04 14:38:59 +02:00
github.cc fix GitHub URL template 2022-05-12 00:56:39 +02:00
indirect.cc InputScheme::fetch(): Return a StorePath instead of a Tree 2022-02-16 11:14:01 +01:00
local.mk Don't overwrite user provided lib*_LDFLAGS 2021-08-25 08:59:19 -07:00
mercurial.cc Avoid fmt when constructor already does it 2022-04-19 01:44:11 +00:00
path.cc libfetchers: remove obsolete filesystem #include 2022-03-15 12:32:11 +01:00
registry.cc Move some stuff from Settings to a new FetchSettings. 2022-03-01 01:39:25 +00:00
registry.hh Style tweaks 2021-07-07 10:02:55 +02:00
tarball.cc fetchTree: Allow fetching plain files 2022-05-19 18:24:49 +02:00