Age | Commit message (Collapse) | Author |
|
Check links in the manual
|
|
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
|
The targets I could find.
|
|
This way the links are clearly within the manual (ie not absolute paths),
while allowing snippets to reference the documentation root reliably,
regardless of at which base url they're included.
|
|
Prior to this change, we had a bunch of ad-hoc string manipulation code
scattered around. This made it hard to figure out what data model for
string contexts is.
Now, we still store string contexts most of the time as encoded strings
--- I was wary of the performance implications of changing that --- but
whenever we parse them we do so only through the
`NixStringContextElem::parse` method, which handles all cases. This
creates a data type that is very similar to `DerivedPath` but:
- Represents the funky `=<drvpath>` case as properly distinct from the
others.
- Only encodes a single output, no wildcards and no set, for the
"built" case.
(I would like to deprecate `=<path>`, after which we are in spitting
distance of `DerivedPath` and could maybe get away with fewer types, but
that is another topic for another day.)
|
|
- Add a comment
- Put `OutputsSpec` in a different header (First part of #6815)
- Make a few stray uses of it in new code use `DerivedPath` instead.
|
|
|
|
|
|
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
libstore/derivation-goal: Elaborate a TODO for performance concern
|
|
On macOS with auto-uid-allocation and sandboxing, use the correct gid
|
|
NixOS modules can be paths. Rather than dig further down into the layer
violation, don't check anything specific to NixOS modules.
|
|
Fix deadlock between auto-GC and addTempRoot()
|
|
Fix `nix why-depends --derivation`
|
|
macOS doesn't have user namespacing, so the gid of the builder needs
to be nixbld. The logic got "has sandboxing enabled" confused with
"has user namespaces".
Fixes #7529.
|
|
|
|
This basically reverts 6e5165b77370c76bfa39d4b55e9f83673f3bd466.
It fixes errors like
sandbox-exec: <internal init prelude>:292:47: unable to open sandbox-minimal.sb: not found
when trying to run a development Nix installed in a user's home
directory.
Also, we're trying to minimize the number of installed files
to make it possible to deploy Nix as a single statically-linked
binary.
|
|
|
|
Previously addTempRoot() acquired the LocalStore state lock and waited
for the garbage collector to reply. If the garbage collector is in the
same process (as it the case with auto-GC), this would deadlock as
soon as the garbage collector thread needs the LocalStore state lock.
So now addTempRoot() uses separate Syncs for the state that it
needs. As long at the auto-GC thread doesn't call addTempRoot() (which
it shouldn't), it shouldn't deadlock.
Fixes #3224.
|
|
This also moves the file handle into its own Sync object so we're not
holding the _state while acquiring the file lock. There was no real
deadlock risk here since locking a newly created file cannot block,
but it's still a bit nicer.
|
|
src/libstore: Print the reason opening the DB failed
|
|
|
|
This caused traces 'at «none»:0: (source not available)'.
|
|
|
|
This has the same goal as b13fd4c58e81b2b2b0d72caa5ce80de861622610,but
achieves it in a different way in order to not break
`nix why-depends --derivation`.
|
|
This reverts commit b13fd4c58e81b2b2b0d72caa5ce80de861622610.
|
|
Optimize intersectAttrs performance
|
|
as proposed by @mkaito[1] and @tazjin[2] and discussed with @edolstra
and Nix maintainers
[1]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270076332
[2]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270201979
Co-authored-by: John Ericson <git@JohnEricson.me>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
|
|
libstore: Make sure that initNix has been called
|
|
|
|
define "store derivation"
|
|
cleanup eval.hh/eval.cc
|
|
Release shared lock before acquiring exclusive lock
|
|
|
|
doc: sandbox-paths computes closures
|
|
nix develop: Set personality
|
|
|
|
In principle, this should avoid deadlocks where two instances of Nix are
holding a shared lock on big-lock and are both waiting to get an
exclusive lock.
However, it seems like `flock(2)` is supposed to do this automatically,
so it's not clear whether this is actually where the problem comes from.
|
|
Always traverse the shortest set.
|
|
Prevent bugs like https://github.com/cachix/cachix/pull/477
|
|
|
|
|
|
This makes 'nix develop' set the Linux personality in the same way
that the actual build does, allowing a command like 'nix develop
nix#devShells.i686-linux.default' on x86_64-linux to work correctly.
|
|
Fix CanonPath::dirOf() returning a string_view of a temporary
|
|
https://hydra.nixos.org/build/202837872
|
|
Without this, the error is lost, and it makes for a hard to debug
situation. Also remove some of the busyness inside the sqlite_open_v2
args.
The errcode returned is not the extended one. The only way to make open
return an extended code, would be to add SQLITE_OPEN_EXRESCODE to the
flags. In the future it might be worth making this change,
which would also simplify the existing SQLiteError code.
|