aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-01-10doc/manual: Fix broken internal linksRobert Hensing
The targets I could find.
2023-01-10doc/manual: Introduce @docroot@ as a stable base for includable snippetsRobert Hensing
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.
2023-01-06Fix typo in example for builtin function mapWill Bush
2023-01-06Merge pull request #7307 from hercules-ci/derivation-goal-improve-commentThéophane Hufschmitt
libstore/derivation-goal: Elaborate a TODO for performance concern
2023-01-06Merge pull request #7557 from NixOS/fix-7529Eelco Dolstra
On macOS with auto-uid-allocation and sandboxing, use the correct gid
2023-01-05Don't check NixOS modulesNaïm Favier
NixOS modules can be paths. Rather than dig further down into the layer violation, don't check anything specific to NixOS modules.
2023-01-05Merge pull request #7542 from edolstra/gc-deadlockEelco Dolstra
Fix deadlock between auto-GC and addTempRoot()
2023-01-05Merge pull request #7539 from tweag/fix-nix-why-depends--derivationEelco Dolstra
Fix `nix why-depends --derivation`
2023-01-05On macOS with auto-uid-allocation and sandboxing, use the correct gidEelco Dolstra
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.
2023-01-04Move macOS sandbox files to sr/libstore/buildEelco Dolstra
2023-01-04Include macOS sandbox files in the Nix binaryEelco Dolstra
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.
2023-01-03nix --version: Print the data directoryEelco Dolstra
2023-01-03Fix deadlock between auto-GC and addTempRoot()Eelco Dolstra
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.
2023-01-03Move creation of the temp roots file into its own functionEelco Dolstra
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.
2023-01-03Merge pull request #7497 from rski/masterEelco Dolstra
src/libstore: Print the reason opening the DB failed
2023-01-02Put the --show-trace hint in the logical placeEelco Dolstra
2023-01-02Don't use state.positions[noPos]Eelco Dolstra
This caused traces 'at «none»:0: (source not available)'.
2023-01-02Merge remote-tracking branch 'origin/master' into coerce-stringEelco Dolstra
2023-01-02Fix why-depends for CA derivations (again)Théophane Hufschmitt
This has the same goal as b13fd4c58e81b2b2b0d72caa5ce80de861622610,but achieves it in a different way in order to not break `nix why-depends --derivation`.
2023-01-02Revert "Fix why-depends for CA derivations"Théophane Hufschmitt
This reverts commit b13fd4c58e81b2b2b0d72caa5ce80de861622610.
2023-01-02Merge pull request #5941 from hercules-ci/optimize-intersectAttrsThéophane Hufschmitt
Optimize intersectAttrs performance
2023-01-02antiquotation -> string interpolationValentin Gagarin
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>
2023-01-02Merge pull request #7478 from hercules-ci/make-sure-initNix-calledThéophane Hufschmitt
libstore: Make sure that initNix has been called
2023-01-02remove redundant re-definition of store derivationsValentin Gagarin
2023-01-02Merge pull request #7485 from fricklerhandwerk/doc-store-derivationThéophane Hufschmitt
define "store derivation"
2023-01-02Merge pull request #7351 from NaN-git/fix-mkStringThéophane Hufschmitt
cleanup eval.hh/eval.cc
2023-01-02Merge pull request #7521 from ncfavier/migration-deadlockThéophane Hufschmitt
Release shared lock before acquiring exclusive lock
2023-01-01Fix error messageSteven Shaw
2022-12-29Merge pull request #7524 from ncfavier/sandbox-paths-closureEelco Dolstra
doc: sandbox-paths computes closures
2022-12-29Merge pull request #7504 from edolstra/nix-develop-personalityEelco Dolstra
nix develop: Set personality
2022-12-28doc: sandbox-paths computes closuresNaïm Favier
2022-12-27Release shared lock before acquiring exclusive lockNaïm Favier
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.
2022-12-24Optimize intersectAttrs performanceRobert Hensing
Always traverse the shortest set.
2022-12-24libstore: Make sure that initNix has been calledRobert Hensing
Prevent bugs like https://github.com/cachix/cachix/pull/477
2022-12-24remove undefined functionPhilipp Otterbein
2022-12-24remove function makeImmutableStringWithLenPhilipp Otterbein
2022-12-23nix develop: Set personalityEelco Dolstra
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.
2022-12-23Merge pull request #7503 from edolstra/fix-dirOfEelco Dolstra
Fix CanonPath::dirOf() returning a string_view of a temporary
2022-12-23Fix CanonPath::dirOf() returning a string_view of a temporaryEelco Dolstra
https://hydra.nixos.org/build/202837872
2022-12-23src/libstore: Print the reason opening the DB failedrski
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.
2022-12-22Merge pull request #7493 from mupdt/primops-storeDir-test-non-standard-pathEelco Dolstra
primops `storeDir` test uses `settings.nixStore`
2022-12-21primops `storeDir` test uses `settings.nixStore`mupdt
2022-12-21link "store derivation" to glossary definitionValentin Gagarin
2022-12-21update description of "store derivation" in installables sectionValentin Gagarin
a store derivation is not a store path itself, it has a store path.
2022-12-21[PDT] TDE-3114: prevent a race-condition when creating the S3 cachemupdt
2022-12-20Merge pull request #7451 from edolstra/abstract-posEelco Dolstra
Introduce AbstractPos
2022-12-20Merge pull request #7473 from hercules-ci/sqlite-errorThéophane Hufschmitt
Improve sqlite error messages
2022-12-20Merge pull request #7480 from nrdxp/fix-develop-drvThéophane Hufschmitt
fix(develop): make `nix develop` drv recreatable
2022-12-19fix(develop): make `nix develop` drv recreatableTimothy DeHerrera
2022-12-19Merge pull request #7462 from ↵Domen Kožar
rapenne-s/improve_messaging_reusing_trusted_substituter Inform user instead of warning them when using a trusted substituter