Commit graph

11573 commits

Author SHA1 Message Date
Yorick 0e0de90b35
extract_archive: fix "Hard-link target '...'" error
Fixes #5741
2021-12-10 17:03:51 +01:00
Yorick be1055f2cc
extract_archive: use copy_pathname instead of set_pathname.
Libarchive documentation mentions that archive_entry_set_pathname
expects us to keep the passed string alive, which we don't.
2021-12-10 17:00:32 +01:00
Eelco Dolstra 20b1290103 Ignore system.nfs4_acl
Closes #1584.
2021-12-10 15:12:55 +01:00
Eelco Dolstra f9437b4f18 Merge branch 'master' of https://github.com/MagicRB/nix 2021-12-10 14:49:25 +01:00
Janne Heß 4194b68250
doc: Fix command for distributed builds
We also need to build impurely or the <nixpkgs> lookup will not work.
2021-12-10 12:58:12 +01:00
Tom Bereknyei 5d64c33fa5 add pull_request_template.md 2021-12-09 14:31:34 -05:00
Eelco Dolstra c7b66caaca
Merge pull request #5752 from NixOS/5706-repl-reassign
Properly take the last assignment in the REPL
2021-12-09 20:16:13 +01:00
Eelco Dolstra 4ce112406b
Merge pull request #5757 from am-on/fix-broken-nixos-channels-link
Fix link to nixos channel
2021-12-09 20:10:29 +01:00
Amon Stopinšek 0bd93ed747
Fix link to nixos channel
The old link returned 404 errror.
2021-12-09 16:44:24 +00:00
regnat 55e3a1108c Properly take the last assignment in the REPL
When a variable is assigned in the REPL, make sure to remove any possible reference to the old one so that we correctly pick the new one afterwards

Fix #5706
2021-12-09 16:35:27 +01:00
Eelco Dolstra bc57b3854e
Merge pull request #5695 from obsidiansystems/tidy-logging
Tidy up the logging
2021-12-09 15:31:08 +01:00
Gavin Ray 971382cab0
Better diagnostics if no valid signature found
I downloaded Nix tonight, and immediately broke it by accidentally removing the default binary caching.
After figuring this out, I also failed to fix it properly, due to using the wrong key for Nix's default binary cache

If the diagnostic message would have been clearer about what/where a "signature" for a "substituter" is + comes from, it probably would have saved me a few hours.
Maybe we can save other noobs the same pain?
2021-12-08 19:55:34 -05:00
Domen Kožar 75654bacc5
Merge pull request #5521 from abathur/clearly_mark_validation_step
installer: clarify starting assumption task
2021-12-08 20:04:03 +00:00
Domen Kožar 9b2ff20e3b
Merge pull request #5489 from abathur/fix_macos_install_vim_plugins
darwin-install: fix break from bad vim plugins
2021-12-08 20:03:45 +00:00
Travis A. Everett b6d08a9e3f darwin-install: fix break from bad vim plugins 2021-12-07 19:41:22 -06:00
Eelco Dolstra 167e864697
Merge pull request #5730 from abathur/darwin_document_fstab_settings
document some darwin mount settings
2021-12-07 22:24:40 +01:00
Eelco Dolstra 92ff5b4254 Tweak warning 2021-12-07 22:22:02 +01:00
Eelco Dolstra 21206caf13 Merge remote-tracking branch 'origin/5712-ca-drvs-with-old-daemon' 2021-12-07 22:06:22 +01:00
Eelco Dolstra 853ef1304c Inline file 2021-12-07 21:45:09 +01:00
Eelco Dolstra 8b5088b62f Merge branch 'balsoft/nix-repl-log' of https://github.com/tweag/nix 2021-12-07 21:33:32 +01:00
Eelco Dolstra a5e9b5428f
Merge pull request #5737 from jtojnar/manual-links
Update manual links
2021-12-06 18:50:22 +01:00
Jan Tojnar ae21aab456 Update manual links
Fixes: https://github.com/NixOS/nixos-homepage/issues/762
2021-12-06 16:42:57 +01:00
Alexander Bantyev 33926ed1e7
nix repl: add :log
Add a :log command that shows logs for a derivation.

Closes https://github.com/NixOS/nix/issues/3504

Co-authored-by: Taeer Bar-Yam <taeer@bar-yam.me>
2021-12-06 16:52:50 +03:00
Alexander Bantyev 0a2fa2d684
RunPager: restore stdout upon pager exit
Before this change, stdout was closed after the pager exits. This is
fine for non-interactive commands where we want to exit right after
the pager exits anyways, but for interactive things (e.g. nix repl)
this breaks the output after we quit the pager.

Keep the initial stdout fd as part of RunPager, and restore it in
RunPager::~RunPager using dup2.
2021-12-06 16:51:55 +03:00
Eelco Dolstra d1aaa7ef71
Change version to X.Y.Z
Fixes #5732.
2021-12-06 13:33:39 +01:00
regnat fa58bff1ab Fallback when the daemon is too old for CA derivations
Fix #5712
2021-12-06 11:45:18 +01:00
Eelco Dolstra 76af9375c1
Merge pull request #5726 from azuwis/master
launchd: Set NumberOfFiles to 4096
2021-12-06 11:25:11 +01:00
Travis A. Everett 8093456111 document some darwin mount settings 2021-12-04 23:16:42 -06:00
Zhong Jianxin d9b3adca75 launchd: Set NumberOfFiles to 4096
The default maxfiles on macOS 11 and macOS 12 is 256, which is too low
for nix to work:

```
$ launchctl limit maxfiles
	maxfiles    256            unlimited
```

Set NumberOfFiles of nix-daemon to 4096 to avoid `Too many open files`
error.
2021-12-04 20:46:29 +08:00
Connor Baker 52f5fa948a Add support for .tar.gz shorthand (.tgz) to TarballInputScheme 2021-12-03 22:16:02 -05:00
Jörg Thalheim ad9322a48f update flake.nix to 21.11 2021-12-03 18:46:09 +01:00
Tom Bereknyei b6cc0a704d flakes: search up to git or filesystem boundary
While parsing a flakeref, upon not finding a flake.nix, search upwards
until git or filesystem boundary.
2021-12-03 10:55:30 -05:00
Eelco Dolstra 2e606e87c4
Merge pull request #5715 from Infinisil/groupBy-primop
Introduce `builtins.groupBy` primop
2021-12-03 13:21:14 +01:00
Eelco Dolstra 6db9ca8ca4
Merge pull request #5718 from rutrum/master
Fix docker command
2021-12-03 13:20:52 +01:00
David Purdum 69b9198875
Fix docker command
`docker -ti run nixos` does not run on docker version 20.10.7 (my machine).  This fixes it to read `docker run -ti nixos`.
2021-12-02 23:38:33 -05:00
Silvan Mosberger 90700736c7 Introduce builtins.groupBy primop
This function is very useful in nixpkgs, but its implementation in Nix
itself is rather slow due to it requiring a lot of attribute set and
list appends.
2021-12-02 21:54:51 +01:00
Eelco Dolstra 2ff71b0213
Merge pull request #5713 from tweag/balsoft/another-follows-bugfix
Flakes: computeLocks: pass correct LockParent when reusing oldLock
2021-12-02 13:17:50 +01:00
Eelco Dolstra 77b3e4b4ee
Merge pull request #5708 from trofi/fix-build-on-gcc-11
src/libutil/util.hh: fix build on gcc-11
2021-12-02 13:16:15 +01:00
Eelco Dolstra b42c1bea42
Merge pull request #5709 from nrdxp/fix-subflake-path-check
Fix parent path check boundary
2021-12-02 13:15:52 +01:00
Eelco Dolstra 77141dded4
Merge pull request #5711 from abathur/fix_stray_relative_diskutil
darwin-install: nail down diskutil invocations
2021-12-02 13:15:03 +01:00
Alexander Bantyev 8cbf862e6f
Flakes: computeLocks: pass correct LockParent when reusing oldLock
Previously, when we were attempting to reuse the old lockfile
information in the computeLocks function, we have passed the parent of
the current input to the next computeLocks call. This was incorrect,
since the follows are resolved relative to the parent. This caused
issues when we tried to reuse oldLock but couldn't for some
reason (read: mustRefetch is true), in that case the follows were
resolved incorrectly.

Fix this by passing the correct parent, and adding some tests to
prevent this particular regression from happening again.

Closes https://github.com/NixOS/nix/issues/5697
2021-12-02 12:02:34 +03:00
Travis A. Everett 3bf7a868ee darwin-install: nail down diskutil
Same purpose as de9efa3b79af7886fcf2a67b6ce97d4f96a57421

For some unclear reason, we get occasional reports from people who do
not have /usr/sbin on their PATH that the installer fails. It's a
standard part of the PATH, so I have no clue what they're doing to
remove it--but it's also fairly cheap to avoid.
2021-12-01 18:38:32 -06:00
David Arnold 7489811736
Fix parent path check boundary
- Previous to this commit the boundary was exclusive of the
  top level flake.
- This is wrong since the top level flake is still a valid
  relative reference.
- Now, the check boundary is inclusive of the top level flake.

Signed-off-by: Timothy DeHerrera <tim.deh@pm.me>
2021-12-01 17:01:48 -07:00
Sergei Trofimovich c32a5f4d38 src/libutil/util.hh: fix build on gcc-11
Due to missing <atomic> declaration the build fails as:

    src/libutil/util.hh:350:24: error: no match for 'operator||' (operand types are 'std::atomic<bool>' and 'bool')
      350 |     if (_isInterrupted || (interruptCheck && interruptCheck()))
          |         ~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |         |                                 |
          |         std::atomic<bool>                 bool
2021-12-01 22:08:05 +00:00
Eelco Dolstra 782837d934 Merge branch 'nix-env-install-suggestions' of https://github.com/tweag/nix 2021-12-01 21:47:28 +01:00
Eelco Dolstra fb662e0acf
Merge pull request #5696 from obsidiansystems/fix-5299
Fix #5299 and remove uncesssary unbounded buffer
2021-12-01 21:32:26 +01:00
Arthur Gautier 21520297da reproducibility: hide non-reproducible settings from manual
Because the manual is generated from default values which are themselves
generated from various sources (cpuid, bios settings (kvm), number of
cores). This commit hides non-reproducible settings from the manual
output.
2021-12-01 17:25:58 +01:00
Théophane Hufschmitt f3f32f0c30
Merge pull request #5599 from fzakaria/faridzakaria/fix-progress-bar-leak
Fix heap use after free in progress-bar.cc
2021-12-01 16:28:38 +01:00
John Ericson 2f5c913d4a Fix #5299
No matter what, we need to resize the buffer to not have any scratch
space after we do the `read`. In the end of file case, `got` will be 0
from it's initial value.

Before, we forgot to resize in the EOF case with the break. Yes, we know
we didn't recieve any data in that case, but we still have the scatch
space to undo.

Co-Authored-By: Will Fancher <Will.Fancher@Obsidian.Systems>
2021-11-30 22:11:46 +00:00
John Ericson 95157b4e66 Push wopAddToStore old style stream adapters into smaller scopes
This doesn't fix the bug, but makes the code less difficult to read.
Also improve the comments, now that it is clear what part is needed in
each code path.
2021-11-30 22:10:58 +00:00