Commit Graph

19 Commits

Author SHA1 Message Date
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
John Ericson
b97242238d fetchzip: Use unzip from buildPackages
Additionally, the manual path manipulation becomes no longer needed.
2018-09-21 12:55:32 -04:00
Eelco Dolstra
c3255fe8ec
fetchzip and friends: Set "name" to "source" by default
This makes them produce the same store paths as builtins.fetchgit,
builtins.fetchTarball etc. See
65b5f177b5.
2017-10-30 17:17:07 +01:00
luigy
eb6c45bcae Fix #27448 argument list too long in fetchzip for darwin.
Paired with @Ericson2314
2017-07-17 11:23:20 -04:00
Eelco Dolstra
97fc806a7b
nix-prefetch-zip: Remove
This script is not needed anymore since "nix-prefetch-url --unpack
<url>" and "nix-prefetch-url -A foo.src" (where "foo.src" is a
fetchzip / fetchFromGitHub call) work fine.
2017-02-16 11:28:23 +01:00
Domen Kožar
a01b6a0d07 fetchzip: improve error message 2016-05-17 17:32:53 +01:00
zimbatm
d2f3e250cf Merge pull request #8576 from obadz/nix-prefetch-zip
Add --ext option to nix-prefetch-zip
2016-02-26 00:57:30 +00:00
Vladimír Čunát
b91dcad4bc fetchFromBitBucket: auto-remove an impure file
Also fix the hash in goPackages.inflect, the only user of the fetcher ATM.
Closes #12002 (different `inflect` fix), fixes #12012.
Using fetchzip-derived functions is likely more efficient than fetchhg,
and it's lighter on dependencies (hash is the same as with fetchhg in this case).
2015-12-29 16:54:50 +01:00
Thomas Tuegel
55544c1e68 nix-prefetch-zip: keep downloaded file extension
Keep the correct file extension on the downloaded file so that
`unpackFile` will know how to unpack it correctly.
2015-12-19 09:32:22 -06:00
obadz
91a2973dc3 Add --ext option to nix-prefetch-zip 2015-07-15 16:15:41 +01:00
Charles Strahan
24b5eb61eb fetchzip: fix unpacking regression
This resolves a regression introduced in fc01353703, where providing a
name without a proper extension breaks existing uses of fetchzip (they
now fail to unpack). Of particular note, that commit broke all uses of
fetchFromGitHub because it uses a name like so: "${repo}-${rev}-src"

Fixes #5954
2015-01-25 20:16:21 -05:00
Charles Strahan
fc01353703 fetchzip: various fixes
This fixes:

 * Passing stripRoot.
 * Archives containing a single file.
 * Archives where the root folder has the same name as one of it's children.

Fixes #5851
2015-01-23 17:10:40 -05:00
Charles Strahan
4a3e689519 nix-prefetch-zip: support single files and recuring directories
See #5851
2015-01-23 17:10:40 -05:00
Charles Strahan
b6f9975b6a nix-prefetch-zip: unset $name
nix-shell leaks $name, breaking nix-prefetch-zip.
2015-01-22 21:18:16 -05:00
Michael Raskin
9ed097ab50 Fix fetchzip for actuall zip files 2014-12-12 15:16:57 +03:00
Eelco Dolstra
1a44dbbbb9 unpackFile: Always copy directories
If $src refers to a directory, then always copy it. Previously, we
checked the extension first, so if the directory had an extension like
.tar, unpackPhase would fail.
2014-08-09 12:44:49 +02:00
Charles Strahan
9bd8dffd77 require gnused for all prefetch scripts 2014-06-23 01:25:40 -04:00
Eelco Dolstra
ea36f3b868 fetchFromGitHub: Use .tar.gz instead of .zip
Also clean up the name attribute of fetchzip derivations a bit.
2014-05-09 15:53:44 +02:00
Eelco Dolstra
c8df888858 Add a function "fetchzip"
This function downloads and unpacks a file in one fixed-output
derivation. This is primarily useful for dynamically generated zip
files, such as GitHub's /archive URLs, where the unpacked content of
the zip file doesn't change, but the zip file itself may (e.g. due to
minor changes in the compression algorithm, or changes in timestamps).

Fetchzip is implemented by extending fetchurl with a "postFetch" hook
that is executed after the file has been downloaded. This hook can
thus perform arbitrary checks or transformations on the downloaded
file.
2014-05-08 15:30:17 +02:00