about summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
Commit message (Collapse)AuthorAge
* nix-prefetch-git: unbreak JSON outputBjørn Forsman2016-07-04
| | | | | | | | | | 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>.
* nix-prefetch-git: Include the date in the machine-readable output onDavid Grayson2016-07-03
| | | | | | | stdout, in strict ISO 8601 format. This will be helpful for automatically updating fetchgit expressions and the dates in version numbers associated with them.
* nix-prefetch-git: fix bash evaluation order dependencyBenno Fünfstück2016-06-15
|
* nix-prefetch-git: shellcheck fixeszimbatm2016-06-12
| | | | | Used shellcheck (https://github.com/koalaman/shellcheck) to validate the script and fixed any resulting escaping and ambiguity issues.
* Merge pull request #15469 from NixOS/fetchgitEelco Dolstra2016-05-16
|\ | | | | fetchgit: remove only .git folder
| * fetchgit: remove only .gitDomen Kožar2016-05-15
| | | | | | | | | | | | | | | | | | | | | | 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.
* | nix-prefetch-git: create parent directoriesGuido Zgraggen2016-04-22
|/
* nix-prefetch-git: fix url_to_name heuristiczimbatm2016-03-23
| | | | | The function wasn't checking that *all* of the characters where [a-z0-9]. Fixes #13921
* nix-prefetch-scripts: make nix-prefetch-git report fetchSubmodules in its ↵Ryan Trinkle2016-03-21
| | | | | | 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.
* nix-prefetch-git: change the default output to JSONzimbatm2016-02-29
| | | | | As discussed on the mailing list. The nix output was short-lived so it's probably okay to change it.
* nix-prefetch-git: print out valid nix expression; make --quiet very quietTim Cuthbertson2016-02-27
|
* nix-prefetch-git: add --quiet flag and minor cleanupTim Cuthbertson2016-02-27
|
* nix-prefetch-git: output base32 hash so output matches nix-build errorsGraham Christensen2016-02-22
| | | | It turns out hashFormat has never been set.
* nix-prefetch-git: use fetchgit's naming heuristiczimbatm2016-02-13
| | | | | | | | | 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)
* Fix usage message in `nix-prefetch-git`Arnaud Spiwack2016-01-26
| | | | | | 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`.
* Merge branch 'staging'Vladimír Čunát2016-01-22
|\
| * fetchgit: import impure GIT_PROXY_COMMAND and SOCKS_SERVER, fixes #8605Rok Garbas2016-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | These environment variables allow using fetchgit with git:// URLs using the SOCKS proxy technique described in 'Using Git with a SOCKS proxy': http://www.patthoyts.tk/blog/using-git-with-socks-proxy.html Briefly, GIT_PROXY_COMMAND is set to a script which invokes connect[1], which reads SOCKS_PROXY, which might be pointing to a local instance of 'ssh -D'. [1] pkgs/tools/networking/connect
* | Merge pull request #10998 from andrewrynhard/masterDomen Kožar2016-01-19
|\ \ | |/ |/| Add help flag to nix-prefetch-git
| * Add help flag to nix-prefetch-gitAndrew Rynhard2015-11-12
| |
* | fetchgit: follow up to 2cf7069b7da368326b51520536ac0f1020157f7aPeter Simons2015-12-06
| | | | | | | | | | | | | | | | If "fetcher" is a string, then Nix will execute it with bash already, so the additional bash argument in that string was redundant and apparently causes trouble on non-Linux platforms. Hopefully fixes https://github.com/NixOS/nixpkgs/issues/11496.
* | Merge recent staging built on HydraVladimír Čunát2015-12-05
|\ \ | | | | | | | | | | | | | | | http://hydra.nixos.org/eval/1231884 Only Darwin jobs seem to be queued now, but we can't afford to wait for that single build slave.
| * | Use the nix provided shell.Danny Wilson2015-11-16
| |/ | | | | | | | | This is guaranteed to be bash, SmartOS has ksh by default and doesn't work.
* | fetchgit: call in-repository script with bash explicitlyPeter Simons2015-11-29
| | | | | | | | | | | | The script's shebang depends on /usr/bin/env, which we don't have in chroot environments. This patch remedies the fallout from ade9f7167dd1fec6, which fixed https://github.com/NixOS/nixpkgs/issues/11284.
* | nix-prefetch-git: make sure the script is interpreted by bashPeter Simons2015-11-27
|/ | | | Fixes https://github.com/NixOS/nixpkgs/issues/11284.
* nix-prefetch-git: pull all tags from remote when checkouting by revisionNikolay Amiantov2015-09-20
| | | | | | | | Close #9790. This fixes checkouting for a nasty combination: 1. To be checkouted is a revision which corresponds to tag in a form "<tag>^{}". 2. This revision is not fetched by default.
* cacert: store ca-bundle.crt in $out/etc/ssl/certs instead of $outWilliam A. Kennington III2015-06-05
|
* Fix ca-bundle pathsWilliam A. Kennington III2015-05-29
|
* Add support for building cargo'ed Rust programsGeorges Dubus2015-04-21
|
* fetchgit: Add support for specifying branch nameRicardo M. Correia2015-04-21
| | | | | | | | This is useful when `leaveDotGit = true` and some other derivation expects some branch name to exist. Previously, `nix-prefetch-git` always created a branch with a hard-coded name (`fetchgit`).
* fetchgit: add 'deepClone' argument to disable shallow fetchingPeter Simons2015-03-10
| | | | | | | This patch resolves https://github.com/NixOS/nixpkgs/issues/6395. Deep cloning is useful in combination with 'leaveDotGit' for builds that want to run "git describe" to obtain a proper version string, etc., like the 'haskellngPackages.cabal2nix' package does.
* nix-prefetch-git: print commit date (close #6522)Bjørn Forsman2015-02-24
| | | | | The commit date can be used as a version number in packages that don't have proper releases.
* fetchgit: improve name detection, discard nix-1.8 checkVladimír Čunát2015-01-13
| | | | | | | | The name detection didn't work for e.g. http://git.suckless.org/sinit/. I tested the tarball builds now. @shlevy claimed nixpkgs requires nix-1.8 features anyway, so the additional check with message were superfluous.
* fetchgit: give output a nicer nameShea Levy2015-01-01
| | | | | Instead of git-export, we get the basename of the repo, plus the shortrev if the commit-ish is a rev.
* fetchgit: Simplify submodule url discoveryWilliam A. Kennington III2014-12-04
|
* nix-prefetch-git: allow dots in submodule namesVincent Laporte2014-11-15
|
* add parens to de ambiguifyEdward Tjörnhammar2014-11-10
|
* Revert "Revert "initialized git repo should use the set http_proxy""Edward Tjörnhammar2014-11-09
| | | | | | | This reverts commit f8a833cfb149b35d590e0f63fe194d1f4f9db42a. This makes sure the check returns a zero code. See discussion on https://github.com/NixOS/nixpkgs/commit/5af576f
* Revert "initialized git repo should use the set http_proxy"Luca Bruno2014-11-09
| | | | | | This reverts commit 5af576ff7f4e657c0053f66d6fba03bfd1e97669. See discussion on https://github.com/NixOS/nixpkgs/commit/5af576f
* initialized git repo should use the set http_proxyEdward Tjörnhammar2014-11-07
|
* nix-prefetch-git: run single-threaded 'git repack'Bjørn Forsman2014-11-03
| | | | | | | | Without this, the generated pack files are non-deterministic. I didn't notice this issue in my earlier testing, because my test repo had too few commits for the thread scheduling to take effect. (Test repo had about 10 commits.)
* nix-prefetch-git: fix determinism with leaveDotGitBjørn Forsman2014-11-02
| | | | | | | | | | | | | | | | | | | | | | | | Add more files to the delete list: * .git/FETCH_HEAD * .git/ORIG_HEAD * .git/refs/remotes/origin/HEAD * .git/config Further, remove all remote branches, remove tags not reachable from the given 'rev', do a full repack and then garbage collect unreferenced objects. According to my testing, the result is fully deterministic. As in "any change done to the upstream repo, ahead of 'rev', will not affect the hash of the resulting 'clone'". Even changing the clone URL will not change the output hash, because .git/config is removed. A new version of git can of course change store format, but that's unavoidable. For big repositories, the repack operation may be a bit heavy. But as far as I can see there is no cheaper way to determinism.
* nix-prefetch-git: remove unneeded semicolonsBjørn Forsman2014-11-01
| | | | Shell isn't Perl ;-)
* nix-prefetch-git: whitespace cleanupBjørn Forsman2014-11-01
| | | | | Use 4 spaces per indent level instead of a mix of 2 spaces, 4 spaces and hardtab. (According to nixpkgs coding style for shell scripts.)
* Allow git checkouts to have custom nameMichael Raskin2014-09-03
|
* build-support: Fix nix-prefetch-* on OS X.aszlig2014-08-27
| | | | | | | | | | | | | | | | Fixes a regression on OS X introduced by f83af95. Don't use --tmpdir for mktemp, because that flag doesn't exist on OS X. However, using -t is deprecated in GNU coreutils, so as suggested by @ip1981 we're now using parameter expansion on ${TMPDIR:-/tmp} to provide /tmp as a fallback if TMPDIR is not set and use it instead. Also use this approach for nix-prefetch-cvs now in order to stay consistent. Reported-by: Vladimir Kirillov <proger@wilab.org.ua> Tested-by: Igor Pashev <pashev.igor@gmail.com> Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* build-support: Use mktemp -d in nix-prefetch-*.aszlig2014-08-25
| | | | | | | | | | | | | | | | | | | | | | Instead of relying on $$ to not collide with an existing path. Quoting the Bash manual about $$: > Expands to the process ID of the shell. In a () subshell, it expands > to the process ID of the current shell, not the subshell. So, this is different from $BASHPID: > Expands to the process ID of the current bash process. This differs > from $$ under certain circumstances, such as subshells that do not > require bash to be re-initialized. But even $BASHPID is prone to race conditions if the process IDs wrap around, so to be on the safe side, we're using mktemp here. Closes #3784. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* prefetch-git: output human-readable rev to stderrBenno Fünfstück2014-08-17
| | | | that way, the stdout stays compatible with nix-prefetch-{bzr,svn,hg}
* Fixed deterministicness of fetchgit with leaveDotGitGeorges Dubus2014-08-10
| | | | | The shebang of .git/hooks depended the git's bash, which made the result depend of that bash's path.
* fetchgit: make deterministic with leaveDotGit (close #3392)Georges Dubus2014-08-08
| | | | | | | There was a few files containing timestamp, so we now remove them. It shouldn't be a problem for logs. However, index might be. Anyway, that's better than nothing.
* Separate fetchgitPrivate into a separate fileShea Levy2014-07-16
|