Commit graph

11 commits

Author SHA1 Message Date
ccicnce113424
f71b30bf0e use builtin fetchers to prevent importing from derivation 2025-07-02 14:08:32 -04:00
Gavin John
3fa176577b Revert "use builtin fetchers to prevent importing from derivation"
This reverts commit 124ffb8b10.
2025-07-01 15:59:23 -04:00
ccicnce113424
124ffb8b10 use builtin fetchers to prevent importing from derivation 2025-06-29 13:21:35 -04:00
Gavin John
4021fa3c83 treewide: nixfmt 2024-11-22 19:10:50 +00:00
Jörg Thalheim
8d75b35167
lib/repoSource: don't copy local repositories to the nix store 2020-04-02 10:23:08 +01:00
tilpner
b077b9fada
gitlab: allow for deeper paths than owner/repo
This was prompted by the INFO4-19 repo, with
the URL
https://gricad-gitlab.univ-grenoble-alpes.fr/Projets-INFO4/18-19/19/code,
which contains groups and subgroups and failed to parse
properly with the current parseGitlabUrl.
2019-03-06 11:24:05 +01:00
Jörg Thalheim
7974547807 fix import from local repository when file is used 2018-09-20 07:48:14 +01:00
Jörg Thalheim
bbd92b3542 disallow deprecated callPackage api 2018-08-14 17:35:19 +02:00
Jörg Thalheim
93f7c23f2f add build-channel command 2018-08-11 14:18:35 +02:00
Jörg Thalheim
97ff96075b move repoSource to external file 2018-08-04 17:58:11 +01:00
Silvan Mosberger
ee65c7afd6
Separate NUR nixpkgs from repos nixpkgs, avoid callPackages
This is essential to get modules in NUR to work. By taking a separate
argument for NUR's nixpkgs (for fetchgit, fetchzip and lib), we don't
need to evaluate the nixpkgs used for repos.

This also implies that you won't be able to `callPackage` NUR anymore,
and instead you'll have to use `import (builtins.fetchGit ".../NUR") {
inherit pkgs; }` instead. Doing this also prevents the evaluation of
pkgs. In case of NixOS, this pkgs depends on your whole config, which is
the source of the recursion. Evaluating this at the last possible moment
is key.

This also means that you won't be able to take package arguments in a
repo definition, you instead get just `pkgs`, also to avoid evaluation
of it.

An error will be thrown when pkgs was required for evaluation but wasn't
passed to the NUR import

The old callPackage syntax will still be supported albeit with a warning

Also repos receive a lib argument,
Using this lib instead of pkgs.lib makes it possible to define library
functions that use other library functions without depending on pkgs ->
should prevent some infinite recursion cases for NixOS module usage.
2018-07-20 04:36:18 +02:00