1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00
Commit graph

22 commits

Author SHA1 Message Date
Steve Walker
453e8dc067 Fix flakes follow symlinks
Co-authored-by: Jan Christoph Bischko <jbischko@barracuda.com>
2025-02-02 08:30:04 +07:00
Eelco Dolstra
550fe889ee Merge remote-tracking branch 'origin/master' into relative-flakes 2025-01-16 11:05:10 +01:00
Eelco Dolstra
ff9d886f3c Use isAbsolute() 2025-01-14 17:42:26 +01:00
Eelco Dolstra
ff8e2fe84e Fix relative 'path:' flakerefs in the CLI
And handle relative 'git+file:' flakerefs while we're at it (these
crashed with an assertion failure).

Fixes #12248.
2025-01-14 17:30:13 +01:00
Eelco Dolstra
cd0127f957 Merge remote-tracking branch 'origin/master' into relative-flakes 2025-01-13 14:13:56 +01:00
Eelco Dolstra
83ff523865 parsePathFlakeRefWithFragment(): Handle query params in the non-git case
Backported from lazy-trees.
2025-01-09 12:17:09 +01:00
Eelco Dolstra
28caa35a97 parsePathFlakeRefWithFragment(): Handle 'path?query' without a fragment
Commands like `nix flake metadata '.?submodules=1'` ignored the query
part of the URL, while `nix build '.?submodules=1#foo'` did work
correctly because of the presence of the fragment part.
2025-01-08 18:38:53 +01:00
Eelco Dolstra
4077aa43a8 ParsedURL: Remove base field 2025-01-07 14:52:00 +01:00
Eelco Dolstra
f705ce7f9a ParsedURL: Remove url field
This prevents a 'url' field that is out of sync with the other
fields. You can use to_string() to get the full URL.
2025-01-07 14:46:03 +01:00
Eelco Dolstra
e8c7dd9971 Rename allowRelative -> preserveRelativePaths 2025-01-07 13:44:08 +01:00
Eelco Dolstra
9223d64ac6 Remove dead code 2024-12-23 16:03:13 +01:00
Eelco Dolstra
8534c4222c Merge remote-tracking branch 'origin/master' into relative-flakes 2024-12-18 21:09:27 +01:00
Eelco Dolstra
7ddf7300b5 Ignore local registries for lock file generation
When resolving indirect flake references like `nixpkgs` in `flake.nix`
files, Nix will no longer use the system and user flake registries. It
will only use the global flake registry and overrides given on the
command line via `--override-flake`.
2024-12-16 09:43:44 +01:00
Sergei Zimmerman
756758d968 chore: get rid of dead code and unused variables where appropriate
Looks like some cruft has been left over from previous refactorings.
This removes dead variables, which should not have side effects in their
constructors. In cases where the variable initialization has a purpose
[[maybe_unused]] is inserted to silence compiler warnings.
2024-11-22 18:05:53 +03:00
Eelco Dolstra
0b00bf7c09 Merge remote-tracking branch 'origin/master' into relative-flakes 2024-11-22 14:44:32 +01:00
Eelco Dolstra
ebb19cc1cd
Drop std::make_pair
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-11-22 09:14:01 +01:00
Eelco Dolstra
850281908c Clean up flakeref parsing
This factors out some commonality in calling fromURL() and handling
the "dir" parameter into a fromParsedURL() helper function.
2024-11-19 16:50:13 +01:00
Bryan Honof
1f024ecfcd
fix: warn on malformed URI query parameter 2024-09-30 14:44:06 +02:00
Eelco Dolstra
21fc07c1a4 Merge remote-tracking branch 'origin/master' into relative-flakes 2024-09-16 13:45:58 +02:00
John Ericson
bc83b9dc1f Remove comparator.hh and switch to <=> in a bunch of places
Known behavior changes:

- `MemorySourceAccessor`'s comparison operators no longer forget to
  compare the `SourceAccessor` base class.

Progress on #10832

What remains for that issue is hopefully much easier!
2024-07-12 14:54:18 -04:00
John Ericson
3fc77f281e No global settings in libnixfetchers and libnixflake
Progress on #5638

There are still a global fetcher and eval settings, but they are pushed
down into `libnixcmd`, which is a lot less bad a place for this sort of
thing.

Continuing process pioneered in
52bfccf8d8.
2024-07-12 08:50:28 -04:00
John Ericson
0084a486cc Split out a new libnixflake
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-06-26 19:56:21 -04:00
Renamed from src/libexpr/flake/flakeref.cc (Browse further)