Commit graph

13344 commits

Author SHA1 Message Date
Robert Hensing be10c09d23 manual: Check links
mdbook-linkcheck is not consistent about its warning setting.
It disables some warnings, but not the warnings about lack of
fragment checking support; hence the extra filtering.
2023-01-10 22:30:41 +01:00
Théophane Hufschmitt 4e2b155d23
Merge pull request #7568 from willbush/patch-1
Fix typo in example for builtin function map
2023-01-07 07:07:53 +01:00
Will Bush 05b13aff3d
Fix typo in example for builtin function map 2023-01-06 23:04:43 -06:00
Eelco Dolstra 3172c51baf
Merge pull request #7498 from fricklerhandwerk/path+string
refactor documentation of operators, document `+` for strings and paths
2023-01-06 13:46:31 +01:00
Théophane Hufschmitt 8d88c3b347
Merge pull request #7307 from hercules-ci/derivation-goal-improve-comment
libstore/derivation-goal: Elaborate a TODO for performance concern
2023-01-06 13:07:57 +01:00
Eelco Dolstra 420ccecc1e
Merge pull request #7557 from NixOS/fix-7529
On macOS with auto-uid-allocation and sandboxing, use the correct gid
2023-01-06 12:35:55 +01:00
Théophane Hufschmitt 1a4a02cff9
Merge pull request #7559 from ncfavier/no-check-modules
Don't check NixOS modules
2023-01-05 21:53:46 +01:00
Naïm Favier f1ee4ece80
Don't check NixOS modules
NixOS modules can be paths. Rather than dig further down into the layer
violation, don't check anything specific to NixOS modules.
2023-01-05 18:23:30 +01:00
Eelco Dolstra d02c5a41da
Merge pull request #7500 from akhildevelops/patch-1
Updated docs to delete build users and group
2023-01-05 17:25:06 +01:00
Eelco Dolstra 3a98107170
Merge pull request #7542 from edolstra/gc-deadlock
Fix deadlock between auto-GC and addTempRoot()
2023-01-05 17:08:23 +01:00
Eelco Dolstra 0fe2b222d5
Merge pull request #7539 from tweag/fix-nix-why-depends--derivation
Fix `nix why-depends --derivation`
2023-01-05 15:32:04 +01:00
Valentin Gagarin e57165b85a bring back table, extract annotations
this makes the table less unwieldy, and leaves enough space for
extensive explanations.
2023-01-05 15:16:16 +01:00
Valentin Gagarin 7da59e94ae add links to documentation for data types 2023-01-05 14:15:01 +01:00
Valentin Gagarin 7b2b9e3648 use more self-explanatory placeholder names 2023-01-05 14:15:01 +01:00
Valentin Gagarin 969e5ad5bf add semantics of overloaded + operator 2023-01-05 14:15:01 +01:00
Valentin Gagarin 63b640e0c2 reword descriptions of operators
add notes on semantics where appropriate
2023-01-05 14:15:01 +01:00
Valentin Gagarin e07448ba6b convert table to subsections
this form is much easier to maintain (also with minimal diffs), and
allows for more details on each operator.

this change a purely mechanical transformation, without changing any contents.
2023-01-05 14:15:01 +01:00
Valentin Gagarin caebe4112e reorder columns
this is for a simpler transformation into a series of subsections
2023-01-05 14:15:01 +01:00
Eelco Dolstra 4e84b532ed On macOS with auto-uid-allocation and sandboxing, use the correct gid
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-05 04:58:55 -08:00
Eelco Dolstra d644b45615
Merge pull request #7551 from NixOS/macos-sandbox-files
Include macOS sandbox files in the Nix binary
2023-01-05 13:34:17 +01:00
Eelco Dolstra 6991e558dd Move macOS sandbox files to sr/libstore/build 2023-01-04 04:50:45 -08:00
Eelco Dolstra 609a7dc059 Include macOS sandbox files in the Nix binary
This basically reverts 6e5165b773.
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-04 04:36:07 -08:00
Eelco Dolstra d4d1ca8b11 nix --version: Print the data directory 2023-01-03 08:30:49 -08:00
Eelco Dolstra 28d5b5cd45 Fix deadlock between auto-GC and addTempRoot()
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-03 15:20:21 +01:00
Eelco Dolstra 224b56f10e Move creation of the temp roots file into its own function
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-03 14:51:23 +01:00
Eelco Dolstra 15341334b5
Merge pull request #7516 from NixOS/dependabot/github_actions/zeebe-io/backport-action-1.0.1
Bump zeebe-io/backport-action from 0.0.9 to 1.0.1
2023-01-03 12:44:42 +01:00
Eelco Dolstra ae31b5f50f
Merge pull request #7497 from rski/master
src/libstore: Print the reason opening the DB failed
2023-01-03 12:44:14 +01:00
Eelco Dolstra a75b7ba30f
Merge pull request #6204 from layus/coerce-string
Add context to better locate runtime coercions
2023-01-02 22:35:23 +01:00
Eelco Dolstra d33d15a48b Put the --show-trace hint in the logical place 2023-01-02 20:53:58 +01:00
Eelco Dolstra c548e35498 Don't use state.positions[noPos]
This caused traces 'at «none»:0: (source not available)'.
2023-01-02 20:53:58 +01:00
Eelco Dolstra 6b69652385 Merge remote-tracking branch 'origin/master' into coerce-string 2023-01-02 20:53:39 +01:00
Théophane Hufschmitt 8cac451fce Fix why-depends for CA derivations (again)
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-02 17:42:22 +01:00
Théophane Hufschmitt 6a90ef072c Increase the test coverage of why-depends
- Test with `--derivation`
- Actually test with ca-derivations (was suuposedly done, but not
  activated because of a missing line in `local.mk`)
2023-01-02 16:09:03 +01:00
Théophane Hufschmitt 105d74eb81 Revert "Fix why-depends for CA derivations"
This reverts commit b13fd4c58e.
2023-01-02 15:44:04 +01:00
Théophane Hufschmitt 9af16c5f74
Merge pull request #5941 from hercules-ci/optimize-intersectAttrs
Optimize intersectAttrs performance
2023-01-02 15:22:38 +01:00
Théophane Hufschmitt 9c05b80db0
Merge pull request #7426 from tianyuanhao/master
Avoid poly_user_note_set twice
2023-01-02 15:15:47 +01:00
Théophane Hufschmitt 34a31b33f1
Merge pull request #7278 from fricklerhandwerk/antiquotation
antiquotation -> string interpolation
2023-01-02 15:03:45 +01:00
Théophane Hufschmitt a654ae8269
Merge pull request #7066 from fricklerhandwerk/architecture-overview
manual: architecture overview
2023-01-02 14:42:01 +01:00
Valentin Gagarin e0c4a95611 antiquotation -> string interpolation
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-02 14:38:57 +01:00
Eelco Dolstra 80a0f77e49
Merge pull request #7470 from obsidiansystems/simplify-tests-slightly
Make `./mk/run-test.sh` work by itself; add `mk/debug-test.sh`
2023-01-02 14:14:30 +01:00
Théophane Hufschmitt fb8fc6fda6
Merge pull request #7478 from hercules-ci/make-sure-initNix-called
libstore: Make sure that initNix has been called
2023-01-02 14:12:49 +01:00
Théophane Hufschmitt 226591494a
Merge pull request #7536 from fricklerhandwerk/doc-fixup
remove redundant re-definition of store derivations
2023-01-02 14:10:33 +01:00
Valentin Gagarin 9cdf8ededb remove redundant re-definition of store derivations 2023-01-02 13:37:59 +01:00
Théophane Hufschmitt cfd6c7fc9b
Merge pull request #7485 from fricklerhandwerk/doc-store-derivation
define "store derivation"
2023-01-02 13:26:41 +01:00
Théophane Hufschmitt e7f2f70750
Merge pull request #7507 from trofi/use-nix-settings-in-tests
tests: switch to non-deprecated nix.settings.* module parameters
2023-01-02 11:49:12 +01:00
Théophane Hufschmitt b3285c7722
Merge pull request #7351 from NaN-git/fix-mkString
cleanup eval.hh/eval.cc
2023-01-02 11:41:52 +01:00
Théophane Hufschmitt e8a3e58171
Merge pull request #7521 from ncfavier/migration-deadlock
Release shared lock before acquiring exclusive lock
2023-01-02 11:08:43 +01:00
Théophane Hufschmitt dd115c0319
Merge pull request #7531 from steshaw/fix-error-message
Fix typo in error message
2023-01-02 07:57:46 +01:00
Théophane Hufschmitt 720c17f89d
Merge pull request #7476 from trofi/allow-external-CXXFLAGS
configure.ac: don't clobber CFLAGS=/CXXFLAGS= and allow users to pass…
2023-01-02 07:37:02 +01:00
Steven Shaw 84b0893725
Fix error message 2023-01-01 12:37:43 +10:00