Commit Graph

272 Commits

Author SHA1 Message Date
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
Arthur Gautier
9d143d5a3b mirrors: oldsuse mirrors have been discontinued
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-08-23 18:45:15 +00:00
Sandro
f150d0a6bd
fetchurl: replace dead sourceforge mirrors (#130834) 2021-07-20 22:32:28 +02:00
Léo Gaspard
b6933f88a5
fetchurl: add testpypi mirror (#123146)
This should make it easier to run nixpkgs-based tests from versions that
are still only on test-pypi, and should not cost anything significant.
2021-05-24 22:24:30 +02:00
Vladimír Čunát
e5ec487840
fetchurl: check that url is a string
Otherwise we (may) get a hard to debug issue in the tarball job,
e.g. see the grandparent commit.
2021-04-01 22:50:22 +02:00
Matthieu Coudron
3dd316723d mirrors: fix lua mirrors
Seems like urls in mirrors must end up with a / otherwise download fails.
2020-12-08 23:55:31 +01:00
Matthew Bauer
669eb09bd5
Merge branch 'master' into fetchurl-no-hash 2020-07-06 14:40:49 -04:00
volth
54c4223e55 treewide: central.maven.org -> repo1.maven.org 2020-06-12 14:26:08 +00:00