Commit graph

13136 commits

Author SHA1 Message Date
Théophane Hufschmitt 82ef3c470b
Merge pull request #7114 from rapenne-s/reenable_test
tests/build-dry: re-enable some test
2022-09-29 16:33:12 +02:00
Solene Rapenne 62d53bc8a4 tests/build-dry: re-enable some test 2022-09-28 15:54:45 +02:00
Solene Rapenne 847cd49909 nix-copy-closure: improve wording 2022-09-28 01:05:46 +02:00
Eelco Dolstra 050fcd391b
Merge pull request #7105 from SquidDev/hotfix/fish-return
Use exit instead of return in /etc/profile.d/nix-daemon.fish
2022-09-27 15:02:29 +02:00
Jonathan Coates 0259702219
Use exit instead of return in fish profile
Older versions of Fish (such as those bundled with Ubuntu LTS 22.04) do
not support return outside of functions. We need to use the equivalent
exit instead.
2022-09-27 12:59:37 +01:00
Eelco Dolstra ace9f261da
Merge pull request #7103 from lheckemann/remove-add-root
nix-build: remove unused --add-root arg
2022-09-27 11:37:09 +02:00
Linus Heckemann 19f3ecd830 nix-build: remove unused --add-root arg
Fixes #1982
2022-09-27 00:07:42 +02:00
Eelco Dolstra dfc3a9afc3
Merge pull request #7043 from edolstra/installer-test
Add an installer test
2022-09-26 17:34:23 +02:00
Eelco Dolstra 71e364c9c7
Quote URLs 2022-09-26 16:57:06 +02:00
Eelco Dolstra eceaf1997c
Remove FIXME 2022-09-26 16:54:31 +02:00
Eelco Dolstra 6806f20157
Merge pull request #7089 from NixOS/mention-accept-flake-config-in-warning
Mention `--accept-flake-config` in the related warning
2022-09-26 11:13:02 +02:00
Eelco Dolstra e25a36cdac
Merge pull request #7093 from amjoseph-nixpkgs/pr/intersectAttrs/values
src/libexpr/primops.cc: correct definition for intersectAttrs
2022-09-26 11:11:53 +02:00
Adam Joseph dc205c75a2 src/libexpr/primops.cc: correct definition for intersectAttrs
The current definition of `intersectAttrs` is incorrect:

> Return a set consisting of the attributes in the set e2 that also exist in the
> set e1.

Recall that (Nix manual, section 5.1):

> An attribute set is a collection of name-value-pairs (called attributes)

According to the existing description of `intersectAttrs`, the following should
evaluate to the empty set, since no key-value *pair* (i.e. attribute) exists in
both sets:

```
builtins.intersectAttrs { x=3; } {x="foo";}
```

And yet:

```
nix-repl> builtins.intersectAttrs { x=3; } {x="foo";}
{ x = "foo"; }
```

Clearly the intent here was for the *names* of the resulting attribute set to be
the intersection of the *names* of the two arguments, and for the values of the
resulting attribute set to be the values from the second argument.

This commit corrects the definition, making it match the implementation and intent.
2022-09-24 23:51:09 -07:00
Théophane Hufschmitt 371013c08d
Merge pull request #7010 from edolstra/ignore-shell
nix develop: Ignore stdenv's $SHELL
2022-09-24 12:55:53 +02:00
Théophane Hufschmitt 3eb185d6d1
Merge pull request #7046 from mkenigs/fix-root-SHELL
dockerImage: fix root shell
2022-09-24 12:53:46 +02:00
Théophane Hufschmitt db29ddd113
Merge pull request #7078 from obsidiansystems/trustworthy-signature
"valid signature" -> "signature by a trusted key"
2022-09-24 12:52:35 +02:00
Théophane Hufschmitt 74276cb354
Merge pull request #7079 from matthewbauer/allow-untrusted-settings
Allow pass max-silent-time and build-poll-interval to daemon untrusted
2022-09-24 12:47:49 +02:00
Théophane Hufschmitt 6a64820cb4
Merge pull request #7082 from rapenne-s/ccache
add ccacheStdenv
2022-09-24 12:45:27 +02:00
Théophane Hufschmitt 1a5d094be7
Mention --accept-flake-config in the related warning
Make sure that people who run Nix in non-interactive mode (and so don't have the possibility to interactively accept the individual flake configuration settings) are aware of this flag.

Fix #7086
2022-09-24 12:11:26 +02:00
Eelco Dolstra cacfc32ee2
Merge pull request #7056 from hiroqn/fix-uname
Fix `uname -m` return value for armv6l/armv7l
2022-09-24 11:13:18 +02:00
Eelco Dolstra c13007f012
Merge pull request #7059 from NixOS/remove-useless-ca-file-message
Remove a useless debug message in filetransfer.cc
2022-09-24 10:39:23 +02:00
John Ericson 60e23c8bae
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Rune K. Svendsen <runesvend@gmail.com>
2022-09-23 13:57:57 -04:00
Solène Rapenne e04b38f789 add ccacheStdenv
when using ccache, rebuild time has been measured
89% faster while not slowing the speed of cold builds
2022-09-23 11:21:19 +02:00
squalus 223f8dace0 archive: check close errors when extracting nars 2022-09-22 12:50:32 -07:00
Matthew Bauer 6e049ae607 Allow pass max-silent-time and build-poll-interval to daemon untrusted
These settings seem harmless, they control the same polling
functionality that timeout does, but with different behavior. Should
be safe for untrusted users to pass in.
2022-09-22 13:59:16 -05:00
John Ericson a2a8cb10ac Dodge "trusted" vs "trustworthy" by being explicit
Hopefully this is best!
2022-09-22 14:37:52 -04:00
John Ericson 752f967c0f "valid signature" -> "trustworthy signature"
I just had a colleague get confused by the previous phrase for good
reason. "valid" sounds like an *objective* criterion, e.g. and *invalid
signature* would be one that would be trusted by no one, e.g. because it
misformatted or something.

What is actually going is that there might be a signature which is
perfectly valid to *someone else*, but not to the user, because they
don't trust the corresponding public key. This is a *subjective*
criterion, because it depends on the arbitrary and personal choice of
which public keys to trust.

I therefore think "trustworthy" is a better adjective to use. Whether
something is worthy of trust is clearly subjective, and then "trust"
within that word nicely evokes `trusted-public-keys` and friends.
2022-09-22 10:49:31 -04:00
Théophane Hufschmitt f704c2720f
Merge pull request #7070 from alyssais/repl-history
nix repl: warn if creating dir for history fails
2022-09-21 13:50:49 +02:00
Alyssa Ross d234d01f01
nix repl: warn if creating dir for history fails
The history is not critical to the functionality of nix repl, so it's
enough to warn here, rather than refuse to start if the directory Nix
thinks the history should live in can't be created.
2022-09-20 11:01:40 +00:00
Théophane Hufschmitt 9dadb5481c
Merge pull request #7065 from squalus/schema-corrupt
Improve durability of schema version file writes
2022-09-20 10:55:13 +02:00
hiroqn ca22936853 fix uname -m return value for armv6l/armv7l 2022-09-20 15:36:36 +09:00
squalus 1b595026e1 Improve durability of schema version file writes
- call close explicitly in writeFile to prevent the close exception
  from being ignored
- fsync after writing schema file to flush data to disk
- fsync schema file parent to flush metadata to disk

https://github.com/NixOS/nix/issues/7064
2022-09-19 20:13:30 -07:00
Théophane Hufschmitt 9d860f3467
Merge pull request #7060 from fricklerhandwerk/issue-templates
issue template: fill 'about' field
2022-09-19 10:53:13 +02:00
Valentin Gagarin 4b11c22386 issue template: fill 'about' field
according to [GitHub documentation] some fields are required.
`about` is not listed, but it probably is required.

[GitHub documentation]: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
2022-09-19 10:05:29 +02:00
Théophane Hufschmitt 0f977bf91e
Remove a useless debug message in filetransfer.cc
Remove the `verify TLS: Nix CA file = 'blah'` message that Nix used to print when fetching anything as it's both useless (`libcurl` prints the same info in its logs) and misleading (gives the impression that a new TLS connection is being established which might not be the case because of multiplexing. See #7011 )
2022-09-19 08:42:43 +02:00
Travis A. Everett 84bdb0e3ad address review feedback
Mainly:
- Try to triangulate between narrative that framed this as
  a new/easy process and the need for a reference that will
  not quickly grow stale.
- Fix a ~continuity issue where the text was talking about
  "your Cachix cache" before saying that you'd need to make
  a Cachix cache to enable the installer tests.
- Adopt suggestion on titling, and nest subtitles in the
  installer test section.
2022-09-18 13:02:42 -05:00
Travis A. Everett 4bd52bf6c4
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-09-17 13:20:11 -05:00
Eelco Dolstra a38a55babe
Merge pull request #7052 from amjoseph-nixpkgs/pr/fetch/impure
libexpr/fetchurl.nix: allow __impure fetch
2022-09-16 13:50:50 +02:00
Adam Joseph ad5b09423a release-notes/rl-next.md: note new argument to fetchurl.nix 2022-09-16 01:59:24 -07:00
Adam Joseph fb985f855c fetchurl.nix: change other use of __impure 2022-09-16 01:54:24 -07:00
Adam Joseph 673fd21b7c
Update src/libexpr/fetchurl.nix
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-09-16 08:51:14 +00:00
Théophane Hufschmitt 41f9b74320
Merge pull request #7050 from fricklerhandwerk/issue-templates
add issue template for missing or incorrect documentation
2022-09-16 10:26:18 +02:00
Adam Joseph b3550d9179 libexpr/fetchurl.nix: allow __impure fetch
This commit adds an optional `__impure` parameter to fetchurl.nix, which allows
the caller to use `libfetcher`'s fetcher in an impure derivation.  This allows
nixpkgs' patch-normalizing fetcher (fetchpatch) to be rewritten to use nix's
internal fetchurl, thereby eliminating the awkward "you can't use fetchpatch
here" banners scattered all over the place.

See also: https://github.com/NixOS/nixpkgs/pull/188587
2022-09-16 00:48:01 -07:00
Valentin Gagarin 875a99eaa4
fix markdown rendering quirk
markdown would interpret parentheses as belonging to the first link without escaping.
2022-09-16 09:41:27 +02:00
Valentin Gagarin dc8c0b173c
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:55 +02:00
Valentin Gagarin 1ae974120a
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:37 +02:00
Valentin Gagarin 0a4bd9fe88
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:30 +02:00
Valentin Gagarin 47fa1087c8
Update doc/manual/src/contributing/hacking.md 2022-09-16 09:36:20 +02:00
Valentin Gagarin 84fb036062 add issue template for missing or incorrect documentation
this allows anyone to create labelled issues for easy filtering.
2022-09-15 18:16:17 +02:00
Eelco Dolstra 0d4bf9c4d8
Fix evaluation 2022-09-15 15:56:46 +02:00