Eelco Dolstra
d944cb7f58
Use isAbsolute()
...
(cherry picked from commit ff9d886f3c
)
2025-01-19 14:58:36 +08:00
Jörg Thalheim
f97da4b11c
libutil/source-accessor: custom error if source does not exist
...
This allows better error handling by catching this error in particular.
2024-05-25 23:06:57 +02:00
Eelco Dolstra
85b9f4ef4f
nix shell: Handle output paths that are symlinks
...
This requires moving resolveSymlinks() into SourceAccessor. Also, it
requires LocalStoreAccessor::maybeLstat() to work on parents of the
store (to avoid an error like "/nix is not in the store").
Fixes #10375 .
2024-04-10 23:49:19 +02:00
Peter Kolloch
5334c9c792
HashType: Rename to HashAlgorithm
...
To be consistent with CLI, nix API
and many other references.
As part of this, we also converted it to a scoped enum.
https://github.com/NixOS/nix/issues/8876
2023-12-06 23:43:42 +01:00
Eelco Dolstra
a0162d5732
Improve SourceAccessor path display
...
Backported from lazy-trees. This allows SourceAccessors to show the
origin of the accessor. E.g. we now get
copying '«git+https://github.com/blender/blender.git?ref=refs/heads/main&rev=4edc1389337dd3679ff66969c332d2aff52e1992»/ ' to the store
instead of
copying '/' to the store
2023-11-20 18:54:36 +01:00
Eelco Dolstra
1a902f5fa7
Merge FSAccessor into SourceAccessor
2023-11-01 17:09:28 +01:00
Eelco Dolstra
cdb27c1519
SourceAccessor: Change the main interface from lstat() to maybeLstat()
2023-11-01 15:26:07 +01:00
Eelco Dolstra
34a42f0d0a
Move PosixSourceAccessor into its own file
2023-10-23 11:05:50 +02:00
Eelco Dolstra
57db3be9e4
SourceAccessor::readFile(): Support reading into a sink
2023-10-20 16:36:41 +02:00
Eelco Dolstra
50156302c0
Deduplicate FSSourceAccessor and FSInputAccessor
2023-10-19 15:20:10 +02:00
Eelco Dolstra
9f572eb0e3
Unify the two implementations of dumpPath()
2023-10-19 15:07:56 +02:00
Eelco Dolstra
fb6a3910c4
Move most of InputAccessor into libutil
2023-10-19 14:45:26 +02:00