Commit Graph

279 Commits

Author SHA1 Message Date
Thomas Gerbet
31ab653f7e fetchurl: revert enabling TLS verification when NIX_SSL_CERT_FILE
This reverts commit f829274128.
2024-10-26 13:58:19 +02:00
Thomas Gerbet
f829274128 fetchurl: enable TLS verification when NIX_SSL_CERT_FILE is set
This is a follow-up to a169553f7e.
In most cases it should allow the TLS verification to be enabled.
It also makes the behavior of `fetchurl` more consistent with other fetchers
like `fetchgit`.

Ideally we would always fallback on `cacert` but I am not sure how to build
`cacert` during bootstrap without making an unmaintainable mess.
2024-10-22 14:58:54 +02:00
Anderson Torres
ce21e97a1f fetchurl: nixfmt-rfc-style 2024-09-25 14:51:53 -03:00
Anderson Torres
a32c7a11dd fetchurl: fixup typo on a comment 2024-09-25 14:51:53 -03:00
Thomas Gerbet
a169553f7e fetchurl: enable TLS verification when credentials are used
This make sure the credentials cannot be leaked in a MITM attack.
Note that this change might break some existing deployments if the users
tries to fetch resources on endpoints with invalid certificates.
The impacted users will have the following choices:
* fix the endpoint providing the resource
* override SSL_CERT_FILE to either disable the verification (not
  recommended) or to set it to a path including their CA certificate.
2024-09-23 18:27:02 +02:00
binarycat
eaf5ec98fe fetchurl: add codemirror.dlang.org to the list of dub mirrors
code.dlang.org actually went down recently, hopefully this should
make that a bit less likely to happen in the future.
2024-04-21 18:51:45 +10:00
TomaSajt
92c8f64c5e
buildDubPackage, dub-to-nix: init 2024-04-03 12:32:08 +02:00
K900
09d4abf0ca fetchurl/mirrors: add cdn.download.kde.org as default KDE mirror 2023-12-03 14:48:56 +03:00
Maximilian Bosch
8bc5104a6e
treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
nicoo
af5682b3e1 fetchurl: Correctly handle { outputHash != ""; outputHashAlgo = "" }
Previously, the error that would be thrown would have been confusing:
```
fetchurl requires a hash for fixed-output derivation
```
2023-08-30 09:51:22 +00:00
nicoo
a59f03079c fetchurl: Validate that a single hash was passed 2023-08-30 09:51:22 +00:00
Jan Malakhovski
9437e4da35 fetchurl: cleanup a bit by moving the warning into assert 2023-08-08 13:38:11 +00:00
Theodore Ni
6f30e0a906
fetchurl: clean up md5 references 2023-07-20 21:23:04 -07:00
Jack Kelly
6c0f4e3b10 mirrors: Remove roy
Roy Marples now releases his code via GitHub.
2023-06-14 17:10:36 +10:00
github-actions[bot]
8b93c4f667
Merge staging-next into staging 2023-06-02 00:03:07 +00:00
Andrew Brooks
04147e058d fetchurl: remove mirror kent.dl.sourceforge.net
The kent.dl.sourceforge.net domain doesn't seem to exist anymore. Because it's
not usable, this commit removes it from the list of sourceforge mirrors.
2023-06-01 15:30:14 -05:00
Sergei Trofimovich
5d119a26aa mirrors/gcc: push 'bigsearch' lower
For some reason 'bigsearch' only partially mirrored 'gcc-12.3.0' and
still lacks the tarballs after a few weeks. Let's use next available
mirror.
2023-05-27 12:32:13 +01:00
Justin Bedo
3e6b47a007
rPackages: switch to official CRAN mirrors 2023-04-05 13:25:06 +10:00
Artturin
fe1c7a1945 treewide: remove usages of header and stopNest
they're obsolete
2023-01-16 00:08:12 +02:00
Artturin
c01f509e44 treewide: source .attrs in builders
if theres a source $stdenv then this is needed

for structuredAttrs
2022-12-08 21:09:02 +02:00
Artturin
3452cd8316 tests.fetchurl: remove alias usage 2022-11-24 22:32:34 +02:00
Sandro
1fd6cf192a
fixup! fetchurl: add pname+version support 2022-10-05 15:54:57 +02:00
Sandro Jäckel
7deac8b8f7
fetchurl: add pname+version support 2022-10-04 17:30:06 +02:00
Stig
24f160cfcd
Merge pull request #187884 from helsinki-systems/feat/perl-sri
perlPackages: Switch to SRI hashes, add `hash` support to bootstrap fetchurl, bump minimal nix version
2022-08-24 17:28:04 +02:00
Janne Heß
0b3e7f063c
boostrap fetchurl: Add SRI support 2022-08-24 09:55:45 +02:00
Vladimír Čunát
cb704bf922
fetchurl: disallow specifying both sha256 and hash
A full check would be more complicated to write -
and more importantly - probably also more expensive.

Motivation: eval-time catch for errors like in commit 8198636be0.
2022-07-26 12:47:14 +02:00
Robert Hensing
1e17bb943e
Merge pull request #164662 from infinisil/fetchurl-curlOpts-list
fetchurl: Allow passing curl options with spaces
2022-06-30 21:10:57 +02:00
Silvan Mosberger
588439e131 fetchurl: Add curlOptsList test 2022-06-30 19:49:54 +02:00
Matthieu Coudron
fb6f9ee28f update-luarocks-package: fix mirrors 2022-06-13 11:17:36 +02:00
github-actions[bot]
574f2d4696
Merge staging-next into staging 2022-05-24 00:02:57 +00:00
milahu
5baa20d7c8
qt6: init at 6.3.0 2022-05-23 09:37:40 +08:00
Artturin
f002ffed9a treewide: enable strictDeps in bootstrap packages 2022-05-22 16:40:26 +03:00
Silvan Mosberger
86c902d673 fetchurl: Introduce curlOptsList as an improvement over curlOpts
It's impossible to pass arguments with spaces with curlOpts.
curlOptsList supports that. Passing a list to curlOpts has been
deprecated. This commit is fully backwards compatible.
2022-04-26 21:01:19 +02:00
Sandro
eb004259d6
Merge pull request #169005 from SuperSandro2000/devilutionX 2022-04-20 22:00:07 +02:00
illustris
6701dd6a4d mirrors: add recommended apache mirror 2022-04-18 02:02:43 +05:30
Sandro Jäckel
a67950f20b
fetchurl: passthru url 2022-04-17 05:30:04 +02:00
Alyssa Ross
da450f6b1d treewide: clean up obsolete version checks
These checks are all redundant with the check for Nix ≥2.2 in
default.nix.
2022-03-22 10:54:11 +00:00
AndersonTorres
b988e9a1f9 pkgs/build-support/fetchurl/mirrors.nix: remove metalab 2022-03-13 21:20:49 -03:00
AndersonTorres
667902897a pkgs/build-support/fetchurl/mirrors.nix: add IBiblioPubLinux
It corresponds to old Metalab/Sunsite.
2022-03-13 18:46:11 -03:00
AndersonTorres
2d88a59de1 pkgs/build-support/fetchurl/mirrors.nix: add TCSH mirrors 2022-03-13 15:44:46 -03:00
AndersonTorres
953de20946 pkgs/build-support/fetchurl/mirrors.nix: reoder 2022-03-13 15:44:38 -03:00
Jonathan Ringer
24cbda98f3 fetchzip: remove need for overrideAttrs 2022-02-26 08:58:08 -08:00
Sandro
5f58402c94
fetchurl: also check certificate when using all zero hash (#152608) 2022-01-02 13:01:17 +01:00
Alyssa Ross
f508ae8894 mirrors: add kernel.org mirrors where appropriate 2021-11-21 13:52:50 +00:00
Alyssa Ross
4419e8ee8e
mirrors: prioritize HTTPS 2021-11-06 01:07:38 +00:00
Alyssa Ross
1b78d3720c
mirrors: use HTTPS where available 2021-11-06 01:07:36 +00:00
Alyssa Ross
246d34d57a
mirrors: remove inactive mirrors 2021-11-06 01:07:34 +00:00
Alyssa Ross
9c70596689
mirrors: update sunet base URLs 2021-11-06 00:45:08 +00:00
Arthur Gautier
1825aae278 mirrors: get a second mirror for metalab
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-08-23 20:47:58 +00:00
Arthur Gautier
91db7bb1d0 mirrors: refresh the mirrors list
Some mirrors are gone, some migrated to http instead of ftp.

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-08-23 18:56:15 +00:00