Commit graph

18 commits

Author SHA1 Message Date
Weijia Wang a2fa54fa67 fetchFromGitHub: fix compatibility issue with nix-prefetch 2024-01-30 12:21:13 +01:00
Vladimír Čunát 141a1ec41d
Merge #279934: fetchFromGitHub: drop unzip 2024-01-16 05:52:01 +01:00
Weijia Wang 71a024e1f6 fetchFromGitHub: drop unzip 2024-01-12 20:26:20 +01:00
Sergei Trofimovich 6104083817 build-support/fetchgithub: fix metadata eval for arguments without locations
Without the change metadata evaluation fails on package like
`zammad.src` where no fields are defined in `.nix `files:

    src = fetchFromGitHub (lib.importJSON ./source.json);

There evaluation fails as:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; zammad.src.meta'
    error:
           23|     # to indicate where derivation originates, similar to make-derivation.nix's mkDerivation
           24|     position = "${position.file}:${toString position.line}";
             |     ^
           25|   };
       error: value is null while a set was expected

After the change evaluation succeeds as:

    $ nix-instantiate --strict --eval --expr 'with import ./. {}; zammad.src.meta'
    { homepage = "https://github.com/zammad/zammad"; }
2023-12-31 11:44:22 +00:00
Felix Buehler f3719756b5 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
Nicolas Benes 52f3a1c42c fetchgit: require sparseCheckout be a list of strings
Passing a (multi-line) string was deprecated in #200082 in favour of
list of strings, but still supported (with warning). Now, enforce use of
list of strings.
2023-06-04 10:04:31 +02:00
piegames a205795c8a treewide: Make some fetchers overridable 2023-04-22 22:29:23 +02:00
Madoura 72f5af191f
fetchGitHub: inherit owner and repo for use with rocmUpdateScript 2022-12-10 13:35:47 -06:00
Nicolas Benes c95d7d5a8c treewide: make sparseCheckout a list of strings 2022-11-15 19:46:12 +01:00
Jan Tojnar 7aae279ad9 unstableGitUpdater: fix updating fetchzip-based sources
a67950f20b added `url` attribute
from `fetchurl` and therefore also from `fetchzip`.
We previously relied on `url` from fetchgit-based fetchers
to find the repo URL but now it will just return tarballs
in the case of `fetchFrom{GitHub,GitLab}`.

Let’s add an attribute to `fetch{git,FromGitHub,FromGitLab}`
to expose a repo URL consistently.
2022-05-24 19:12:12 +02:00
Jonathan Ringer 560bf3f760 fetchFromGitHub: perserve originating position 2022-02-10 10:18:16 -08:00
Jonathan Ringer 665684a981 fetchFromGitHub: don't overwrite meta 2022-02-10 10:18:16 -08:00
Zhong Jianxin 57829cc246 fetchgithub: Support sparseCheckout 2022-01-24 11:31:41 +08:00
Sandro Jäckel 597e2ce523
fetchgithub: fix eval when passing forceFetchGit 2021-11-11 17:28:35 +01:00
Sandro Jäckel 00dc3dcf8b fetchFromGitHub: allow forcing fetchGit 2021-09-28 15:00:11 +02:00
Sandro Jäckel b9f8421d48 fetchgithub: allow private repos to use fetchgit 2021-09-28 15:00:11 +02:00
sternenseemann 697b46aa96 fetchFromGitHub: also use git if deepClone or leaveDotGit is used
leaveDotGit is only inherited if it is explicitly set, so fetchgit's
default value for leaveDotGit ? deepClone is respected.
2020-12-21 13:20:04 +01:00
Matthew Bauer d16e0f8dc3 all-packages: move fetch* to pkgs/build-support/ 2019-01-26 22:47:54 -05:00