summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
AgeCommit message (Collapse)AuthorFilesLines
2019-11-26nix-prefetch-git: list --branch-name in helpDima1-0/+1
Listing the option and brief explanation. Addresses: https://github.com/NixOS/nixpkgs/issues/74182
2019-11-14fetchgitPrivate: Remove fetcheradisbladis1-26/+0
Since Nix 2.0 we have `builtins.fetchGit` which is a much better option since it runs in the evaluator and has access to the regular users ssh keys.
2019-09-08treewide: remove redundant quotesvolth2-3/+3
2019-08-31nix-prefetch-git: Remove some pack file non-determinismSilvan Mosberger1-1/+3
2019-06-18Merge pull request #54543 from thefloweringash/git-prefetch-errorsMatthew Bauer1-15/+32
nix-prefetch-git: propagate errors under --quiet
2019-05-03nix-prefetch-git: add -h as shortcut for --help to improve quality of lifeAndreas Rammhold1-1/+1
Especially as a new user it is a much better experience to receive a proper help response to `-h`. Currently passing `-h` will cause some runtime error with the `git remote` error help being shown. Not very helpful. It doesn't hurt to be a bit more user friendly in this case.
2019-01-25nix-prefetch-git: propagate errors under --quietAndrew Childs1-15/+32
2019-01-18prefer-fetch-remote: an overlay to fetch on remote buildersJörg Thalheim1-1/+2
This is useful when running tools like NixOps or nix-review on workstations where the upload to the builder is significantly slower then downloading the source on the builder itself.
2018-12-25treewide: Fix broken Gmane URLsCraig Younkins1-1/+1
2018-07-21pkgs/*: remove unreferenced function argumentsvolth1-1/+1
2018-06-28fetchgit: adapt regex to git 2.18.0Guillaume Maudoux1-1/+1
2018-06-17nix-prefetch-git: fix output `fetchSubmodules` propertyTim Cuthbertson1-1/+1
2018-05-04nix-prefetch-git: fix handling of submodules with spacesLionello Lunesu1-1/+1
The script would parse the output of `git submodule status` but didn't handle paths with spaces in them. This would result in the following error when trying to determine the URL of the submodule: error: key does not contain a section: .url
2018-01-24nix-prefetch-git: fix extraction of submodule hashes on latest gitWill Dietz1-1/+1
Summary: According to git-submodule manpage, "git submodule status" prefixes the hash with a '-' if it is not initialized, and other chars in other circumstances. (this is consistent on the various git versions tested) nix-prefetch-git runs "git submodule init" which does you'd think, but apparently despite this earlier versions of git before 2.16 would still give the hash the '-' suffix. In particular this is the behavior when using 2.15 and 2.14.1 from the nixos-17.09 and nixos-17.03 channels respectively. The script then used awk to drop the first char of the first field which does the wrong thing when there is no prefix emitted: while there is a space character before the hash, this is not part of the field and so we ended up eating the first character of the hash. To fix this in a way that also works with the previous behavior, this commit instead uses awk to grab the hash field and uses tr to delete any '-' chars should they be present. This seems to work in my testing, and for example can now successfully fetch the source for "nginxModules.brotli" where previously it would generate an error: fatal: '22564a95d9ab58865a096b8d9f7324ea5f2e03e' is not a commit and a branch 'fetchgit' cannot be created from it (we dropped a '2' from the beginning of the hash)
2018-01-10treewide: Fetchers should use `stdenvNoCC`.John Ericson1-4/+4
2018-01-09treewide: Fixed output fetch* derivations should use `nativeBuildInputs`John Ericson2-2/+2
2017-11-07fetchgitPrivate: put our custom ssh on PATHFrederik Rietdijk1-13/+20
Currently we wrap ssh so it can find the config file passed in by <ssh-config-file>. If one however uses ProxyCommand ssh, then ssh that is on PATH is taken (which is also unavailable when using nix-shell --pure), which is the plain ${openssh}/bin/ssh. This commit makes sure our wrapped ssh is available on PATH.
2017-10-30fetchzip and friends: Set "name" to "source" by defaultEelco Dolstra1-19/+0
This makes them produce the same store paths as builtins.fetchgit, builtins.fetchTarball etc. See https://github.com/NixOS/nix/commit/65b5f177b5fbb1b0778ede047a13a3cee9c59cfe.
2017-10-29Update nix-prefetch-gitVaibhav Sagar1-1/+1
s/understand/understood/
2017-07-09Merge: more compatibility for git* fetchersVladimír Čunát2-13/+30
They're additional commits from #26877. Changing names of the fetched stuff was changing very many hashes, and I think it's better to avoid that for the moment to reduce work needed by nixpkgs users. The fetchers are expected to be commonly used even outside nixpkgs, and the current naming wasn't that bad usually. (commit analogical to d10c3cc5eedf58e80e2; I haven't noticed the part of the PR has already got to master)
2017-07-05support old naming, just add escaping of unsafe charsVolth1-2/+14
2017-07-05Merge branch 'master' into stagingVladimír Čunát1-0/+1
2017-07-04gitRepoToName: make it compatible with old fetchFromGitHub's ↵Volth1-11/+16
"${repo}-${rev}-scr" to avoid mass rebuild
2017-07-04fetchFromGitHub: fix fetchSubmodules=true when revision is not hexadecimalVolth3-16/+18
2017-07-03nix-prefetch-git: add --quiet to --helpHarmen1-0/+1
2017-06-24fetchgit: support "git@server:repo" URLsBjørn Forsman2-3/+3
Update the code that extracts the base name from a git repo URL so that it can deal with URLs like "git@server:repo".
2017-06-03fetchgit: add postFetch argumentDaiderd Jordan2-1/+5
2017-03-20fetch-*: remove md5 supportRobin Gloster1-3/+5
fixes #4491
2017-01-03nix-prefetch-git: remove call to non-existent print_metadata command; ↵Connor Clark1-2/+1
improve hash mismatch error message.
2016-12-05nix-prefetch-git: fix date fieldJörg Thalheim1-2/+2
in some cases `git show` include tag information in the output this is suppressed by the parameter '-1'
2016-12-05nix-prefetch-git: escape string fields properlyJörg Thalheim1-11/+21
json requires certain characters to be escaped in strings.
2016-11-30Remove fetchMD5warnEelco Dolstra1-2/+1
Deprecation warnings should not be used in Nixpkgs because they spam innocent "nix-env -qa" users with (in this case) dozens of messages that they can't do anything about. This also reverts commit 2ca883338389b7ab995924a0cab0211993bdf1da.
2016-11-18fetchFromGitHub: add fetchSubmodules optionAlexey Shmalko1-1/+1
This commit extends fetchFromGitHub with ability to fetch GitHub repositories with submodules, so we can use the function consistently with all GitHub repositories. Note it doesn't change the previous behavior.
2016-10-09fetch*: print a trace warning about md5 deprecationMichael Raskin1-1/+2
2016-09-17lib/fetchers.nix: factor out impure proxy vars (#18702)Profpatsch1-7/+3
Apparently everyone just copied those variables, instead of creating a library constant for them. Some even removed the comment. -.-
2016-07-04nix-prefetch-git: unbreak JSON outputBjørn Forsman1-2/+2
This fixes a regression caused by commit f56ab9e ("nix-prefetch-git: Include the date in the machine-readable [...]") where a couple of directory paths printed by pushd/popd appeared before the JSON output on stdout (thus breaking it). Fix it by redirecting the extraneous output to /dev/null. Reported by Michael Alan Dorman <mdorman@ironicdesign.com>.
2016-07-03nix-prefetch-git: Include the date in the machine-readable output onDavid Grayson1-3/+8
stdout, in strict ISO 8601 format. This will be helpful for automatically updating fetchgit expressions and the dates in version numbers associated with them.
2016-06-15nix-prefetch-git: fix bash evaluation order dependencyBenno Fünfstück1-1/+1
2016-06-12nix-prefetch-git: shellcheck fixeszimbatm1-31/+42
Used shellcheck (https://github.com/koalaman/shellcheck) to validate the script and fixed any resulting escaping and ambiguity issues.
2016-05-16Merge pull request #15469 from NixOS/fetchgitEelco Dolstra1-1/+1
fetchgit: remove only .git folder
2016-05-15fetchgit: remove only .gitDomen Kožar1-1/+1
Source of this change goes back to 2009 and original version of fetchgit at 205fb0c87eab5dd53c6a0e97b1ff0e48f141c902. The nondeterminism is really caused by changing .git so leave other files alone as they might be interesting. Note: this causes a hash mismatch with Hydra's version of Git Plugin which we should fix to comply.
2016-04-22nix-prefetch-git: create parent directoriesGuido Zgraggen1-2/+2
2016-03-23nix-prefetch-git: fix url_to_name heuristiczimbatm1-1/+1
The function wasn't checking that *all* of the characters where [a-z0-9]. Fixes #13921
2016-03-21nix-prefetch-scripts: make nix-prefetch-git report fetchSubmodules in its ↵Ryan Trinkle1-1/+6
JSON output Previously, nix-prefetch-git would report the same JSON whether submodules were being fetched or not; with this change, the --fetch-submodules option will cause the JSON output to include "fetchSubmodules": true, so that fetchgit (builtins.fromJSON (builtins.readFile ./path/to/output.json)) will work.
2016-02-29nix-prefetch-git: change the default output to JSONzimbatm1-3/+3
As discussed on the mailing list. The nix output was short-lived so it's probably okay to change it.
2016-02-27nix-prefetch-git: print out valid nix expression; make --quiet very quietTim Cuthbertson1-10/+50
2016-02-27nix-prefetch-git: add --quiet flag and minor cleanupTim Cuthbertson1-2/+3
2016-02-22nix-prefetch-git: output base32 hash so output matches nix-build errorsGraham Christensen1-1/+1
It turns out hashFormat has never been set.
2016-02-13nix-prefetch-git: use fetchgit's naming heuristiczimbatm1-3/+20
This commit fixes #6651. Before this change the `nix-prefetch-git` script would use a different store name than nix's `fetchgit` function. Because of that it was not possible to use `nix-prefetch-git` as a way to pre-populate the store (for example when the user it using private git dependencies that needs access to the ssh agent)
2016-01-26Fix usage message in `nix-prefetch-git`Arnaud Spiwack1-2/+2
The comment related to the `deepClone` and `no-deepClone` options was misleading as these options have no relation with submodules, but on the the depth in `git clone --depth n`.