aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
AgeCommit message (Collapse)Author
2022-02-16InputScheme::fetch(): Return a StorePath instead of a TreeEelco Dolstra
2022-01-18Get rid of std::shared_ptr<std::string> and ref<std::string>Eelco Dolstra
These were needed back in the pre-C++11 era because we didn't have move semantics. But now we do.
2021-12-03Add support for .tar.gz shorthand (.tgz) to TarballInputSchemeConnor Baker
2021-12-01Fix parent path check boundaryDavid Arnold
- Previous to this commit the boundary was exclusive of the top level flake. - This is wrong since the top level flake is still a valid relative reference. - Now, the check boundary is inclusive of the top level flake. Signed-off-by: Timothy DeHerrera <tim.deh@pm.me>
2021-11-16Merge pull request #5452 from Kha/git-extend-lockEelco Dolstra
git: extend cache dir lock over all mutating operations
2021-11-14libfetchers: set free gitlab headersFinn Behrens
2021-11-01git: extend cache dir lock over all mutating operationsSebastian Ullrich
2021-10-26Support building flakes from a Git repo url with submodules query parameterTimothy
2021-09-24Explicitly set initial branch name for gitoxalica
2021-09-22Revert "Merge pull request #4922 from nrdxp/default-submodules"Eelco Dolstra
This reverts commit 6678e98411cd3bfe8143a4ba1b35d1451babce32, reversing changes made to 90b2dd570cbd8313a8cf45b3cf66ddef2bb06e07.
2021-09-21Allow relative paths anywhere into the parent's store pathEelco Dolstra
2021-09-21path fetcher: Fix relative path checkEelco Dolstra
2021-09-14Rename unnecessary git@Eelco Dolstra
2021-09-14github fetcher: Don't use HEAD branch when cloningEelco Dolstra
Fixes #4394.
2021-09-14github fetcher: Use git+https for cloningEelco Dolstra
git+ssh only works if you have SSH access.
2021-09-14Fix macOS buildEelco Dolstra
2021-09-13RunOptions: Use designated initializersEelco Dolstra
Also get rid of _killStderr because it wasn't actually checked anywhere.
2021-09-13Remove tabsEelco Dolstra
2021-09-07Merge pull request #4922 from nrdxp/default-submodulesShea Levy
libfetchers/git: fetch submodules by default
2021-08-30Merge pull request #5175 from Pamplemousse/makeEelco Dolstra
Don't overwrite user provided `lib*_LDFLAGS`
2021-08-25Don't overwrite user provided `lib*_LDFLAGS`Pamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-23Coding styleEelco Dolstra
2021-08-17Fix follows paths in subordinate lockfilesAlex Zero
2021-08-02fix git init race conditionMichael Fellinger
2021-07-24Enable pthreads for new librariesAlyssa Ross
Otherwise the lack of pthread causes linking to fail for NetBSD.
2021-07-08Merge pull request #4988 from NixOS/fetchgit-name-attributeEelco Dolstra
Add a name attribute to the fetchers
2021-07-07Style tweaksEelco Dolstra
2021-07-06allow fetchFromGitHub to take a `name` argumentregnat
2021-07-06allow fetchMercurial to take a `name` argumentregnat
2021-07-06allow fetchTarball to take a `name` argumentregnat
2021-07-06Allow `fetchGit` to take a `name` argumentregnat
Fix #3388
2021-06-30nix registry pin: add a way to pin to a custom lockedAlexander Bantyev
2021-06-17libfetchers/git: fetch submodules by defaultTimothy DeHerrera
2021-06-02fix error: 'optional' in namespace 'std' does not name a template typekeke
2021-05-29Add .tar.zst support for TarballInputSchemeTimothy Klim
2021-04-19Include sys/wait.h everywhere WIFEXITED etc is usedAlyssa Ross
This is required on NetBSD, and I think FreeBSD too.
2021-04-09Revert "libfetchers/tarball: Lock on effectiveUrl"Eelco Dolstra
This reverts commit fc6bfb261d50102016ed812ecf9949d41fe539f7. Fixes #4672.
2021-03-30fetchGit: don't prefix "refs/heads/" on ref = "HEAD"Bjørn Forsman
This fixes builtins.fetchGit { url = ...; ref = "HEAD"; }, that works in stable nix (v2.3.10), but is broken in nix master: $ ./result/bin/nix repl Welcome to Nix version 2.4pre19700101_dd77f71. Type :? for help. nix-repl> builtins.fetchGit { url = "https://github.com/NixOS/nix"; ref = "HEAD"; } fetching Git repository 'https://github.com/NixOS/nix'fatal: couldn't find remote ref refs/heads/HEAD error: program 'git' failed with exit code 128 The documentation for builtins.fetchGit says ref = "HEAD" is the default, so it should also be supported to explicitly pass it. I came across this issue because poetry2nix can use ref = "HEAD" in some situations. Fixes #4674.
2021-03-19Use the appropriate config dir for the registrySamuel Dionne-Riel
2021-03-11Merge pull request #4566 from orbekk/masterEelco Dolstra
Add support for bare git repositories when using git+file
2021-03-02libfetchers/tarball: Lock on effectiveUrldramforever
Basically, if a tarball URL is used as a flake input, and the URL leads to a redirect, the final redirect destination would be recorded as the locked URL. This allows tarballs under https://nixos.org/channels to be used as flake inputs. If we, as before, lock on to the original URL it would break every time the channel updates.
2021-03-01Add support for bare git repositories with git+fileKjetil Orbekk
Local git repositories are normally used directly instead of cloning. This commit checks if a repo is bare and forces a clone. Co-authored-by: Théophane Hufschmitt <regnat@users.noreply.github.com>
2021-01-27Add traces to errors while updating flake lock fileEelco Dolstra
Example: $ nix build --show-trace error: unable to download 'https://api.github.com/repos/NixOS/nixpkgs/commits/no-such-branch': HTTP error 422 ('') response body: { "message": "No commit found for SHA: no-such-branch", "documentation_url": "https://docs.github.com/rest/reference/repos#get-a-commit" } … while fetching the input 'github:NixOS/nixpkgs/no-such-branch' … while updating the flake input 'nixpkgs' … while updating the lock file of flake 'git+file:///home/eelco/Dev/nix'
2021-01-22Remove expectedETag assert in tarball.ccMatthew Bauer
2021-01-18Merge branch 'slashes-in-github-branches' of https://github.com/Ma27/nixEelco Dolstra
2021-01-08string2Int(): Return std::optionalEelco Dolstra
2021-01-05Fix conversion from JSON to fetch attributesDanila Fedorin
It appears as through the fetch attribute, which is simply a variant with 3 elements, implicitly converts boolean arguments to integers. One must use Explicit<bool> to correctly populate it with a boolean. This was missing from the implementation, and resulted in clearly boolean JSON fields being treated as numbers.
2020-12-24Merge branch 'master' into support-libcxx10Matthew Bauer
2020-12-23Cast variants fully for libc++10Matthew Bauer
libc++10 seems to be stricter on what it allows in variant conversion. I'm not sure what the rules are here, but this is the minimal change needed to get through the compilation errors.
2020-12-22Add explicit `allRefs = true;` argument to `fetchGit`Maximilian Bosch
Sometimes it's necessary to fetch a git repository at a revision and it's unknown which ref contains the revision in question. An example would be a Cargo.lock which only provides the URL and the revision when using a git repository as build input. However it's considered a bad practice to perform a full checkout of a repository since this may take a lot of time and can eat up a lot of disk space. This patch makes a full checkout explicit by adding an `allRefs` argument to `builtins.fetchGit` which fetches all refs if explicitly set to true. Closes #2409