Commit graph

6961 commits

Author SHA1 Message Date
Puck Meerburg
9879e25473 Add testcase for attrset using __overrides and dynamic attrs
(cherry picked from commit cdadbf770855e828a0f64d70a47db43e920ad137)
2020-01-04 14:12:18 +01:00
Puck Meerburg
59bbc31701 Ensure enough space in attrset bindings when using both __overrides and dynamic attributes
(cherry picked from commit cd55f91ad2075d5ebb506950dfbc4161cab22db5)
2020-01-04 14:12:13 +01:00
Maximilian Bosch
195cc3f883 doc: Document --dry-run option for nix-build
(cherry picked from commit 52ffe2797a6a943bac968e92ad443a567dfdf80e)
2020-01-04 14:11:52 +01:00
Kevin Stock
a118444f36 docs: correct default location of log directory
(cherry picked from commit cea05e5ee758daad40047db0b861980d80da2e85)
2020-01-04 14:11:31 +01:00
Robin Gloster
3130aafd01 builtins.toJSON: fix __toString usage
(cherry picked from commit e583df52800b4baa1564b027fe3b83a21756c2cc)
2020-01-04 14:10:56 +01:00
Eelco Dolstra
6c90e3b9ac install-multi-user.sh: Remove unused variables
https://hydra.nixos.org/build/104119659
(cherry picked from commit 2f96a89646c6e55e2f1bbb80805dcbbe60fa94ae)
2020-01-04 14:10:29 +01:00
Chaz Schlarp
9f524d9423 Remove superfluous IAM action for S3 cache
`s3:ListObjects` isn't a real IAM action, but _is_ the name of an S3 API method. `s3:ListBucket` is the relevant action for that method.

https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html
(cherry picked from commit c92ea927e508f3c06b6b3ee68e1f0565264cac2c)
2020-01-04 14:10:23 +01:00
Ersin Akinci
93d6814847 Tweak path hint
(cherry picked from commit f107a270026596e525bdf8df0e2d331783ec4a10)
2020-01-04 14:10:19 +01:00
Ersin Akinci
e9c0c772b0 Add hint about path in builtins.import
(cherry picked from commit b7a936224ee6e1ad9c842f618bbd5bc1864ebd54)
2020-01-04 14:10:15 +01:00
Ersin Akinci
1ea63a5931 Revert "Document import <path> syntax"
This reverts commit d8730fb86facadbef22d3df7f8a743a56e7ed53c.

(cherry picked from commit 9be7787ec04d604a4e65a22a6b9ae56567aaf618)
2020-01-04 14:09:59 +01:00
Steven Shaw
e1fb586138 Fix unset variable in installer
(cherry picked from commit f0ec4b4ce478a8d2760203e8192275b88c770e1c)
2020-01-04 14:09:14 +01:00
Dan Callahan
34bf1a8b5f Make nix-daemon.plist less fragile on macOS
We're calling `wait4path` on the full, resolved `@bindir@/nix-daemon` path.

That means we're hardcoding something like:

    /bin/wait4path /nix/store/zs9c5xhp3zv9p23qnjxp87nl5injsi1i-nix-2.3/bin/nix-daemon &amp;&amp; /nix/var/nix/profiles/default/bin/nix-daemon

That seems unnecessarily fragile.

It might be better to wait4path on the path we intend to call.

(cherry picked from commit 8c4a5e7ba1990348b9497c0fc4dc236dda3e7986)
2020-01-04 14:07:41 +01:00
Matthew Bauer
7a011ded77 Copy instead of linking launch agent
On Catalina, the /nix filesystem might not be mounted at start time.
To avoid this service not starting, we need to keep the launch agent
outside of the Nix store. A wait4pid will hold for our /nix dir to be
mounted.

Fixes #3125.

(cherry picked from commit 0847f2f1b3145a62dc34707ba788275ce6b6fc57)
2020-01-04 14:06:29 +01:00
Eelco Dolstra
eacc510572 Bump version number 2020-01-04 14:04:38 +01:00
Eelco Dolstra
9cf52dd1cc Disable the evalNixOS test
It also OOMs.

https://hydra.nixos.org/build/105942679
(cherry picked from commit 99af822004418b25b6d04eca67949c62e770c16b)
2020-01-04 14:02:40 +01:00
Eelco Dolstra
5526f725a8 Disable the evalNixpkgs test
It constantly OOMs.

https://hydra.nixos.org/build/105784912
(cherry picked from commit 35732a95bcdc0a4b4492845205e6283fcc88fd0d)
2020-01-04 14:02:35 +01:00
Matthew Bauer
421f1f4493 Move tmpDirInSandbox to initTmpDir
(cherry picked from commit 96c84937c49435525d0733437aa88902b2c8caf6)
2020-01-04 13:41:42 +01:00
Matthew Bauer
10bf5340ca Fix sandbox fallback settings
The tmpDirInSandbox is different when in sandboxed vs. non-sandboxed.
Since we don’t know ahead of time here whether sandboxing is enabled,
we need to reset all of the env vars we’ve set previously. This fixes
the issue encountered in https://github.com/NixOS/nixpkgs/issues/70856.

(cherry picked from commit 499b0388759db0f9f385da402a4bba551268aa99)
2020-01-04 13:41:35 +01:00
Eelco Dolstra
8b44ed08e7 ssh-ng: Don't set CPU affinity on the remote
Fixes #3138.

(cherry picked from commit 906d56a96b442d4dd8f924c1ce0d1eec0e214af3)
2020-01-04 13:41:06 +01:00
Eelco Dolstra
1ac8c0269a SourceExprCommand::getSourceExpr(): Allocate more space
Fixes #3140.

(cherry picked from commit 389a2cebed7cd72bda524ece0a56af2888cd80b6)
2020-01-04 13:40:56 +01:00
Ersin Akinci
c7b4bf1c9c Document import <path> syntax
(cherry picked from commit d8730fb86facadbef22d3df7f8a743a56e7ed53c)
2020-01-04 13:40:46 +01:00
ng0
a53e4e217b include netinet/in.h in src/nix/main.cc
Fixes #3186

(cherry picked from commit b811bd2172bc9796f42b87996f455d4e5e4382ba)
2020-01-04 13:40:14 +01:00
Harald van Dijk
61855a4e7b Fix progress bar when nix-prefetch-url is piped.
The intent of the code was that if the window size cannot be determined,
it would be treated as having the maximum possible size. Because of a
missing assignment, it was actually treated as having a width of 0.

The reason the width could not be determined was because it was obtained
from stdout, not stderr, even though the printing was done to stderr.

This commit addresses both issues.

(cherry picked from commit c935ad3f025d5c3d8026711a1eb50b2917b61d59)
2020-01-04 13:40:03 +01:00
Brian Wignall
9b4e99801f Fix typos
(cherry picked from commit 8737980e75bf14cae278f596ac26577bec94b3f9)
2020-01-04 13:39:19 +01:00
Eelco Dolstra
8be0440d44 EvalState::callFunction(): Make FunctionCallTrace use less stack space
The FunctionCallTrace object consumes a few hundred bytes of stack
space, even when tracing is disabled. This was causing stack overflows:

  $ nix-instantiate '<nixpkgs> -A texlive.combined.scheme-full --dry-run
  error: stack overflow (possible infinite recursion)

This is with the default stack size of 8 MiB.

Putting the object on the heap reduces stack usage to < 5 MiB.

(cherry picked from commit 98ef11677c43db9aa669768d9f0cbec704e8831c)
2020-01-04 13:38:42 +01:00
Eelco Dolstra
61e816217b
nix verify: Fix uninitialized variable
(cherry picked from commit 95cf23ee7c5b0fd69b21811989a5668f4261fd51)
2019-10-10 15:03:46 +02:00
Eelco Dolstra
21f48ff26a
nix-env: Ignore failures creating ~/.nix-profile and ~/.nix-defexpr
https://hydra.nixos.org/build/102803093
(cherry picked from commit c3aaf3b8da1a925c569389f13a861816a781a3c8)
2019-10-10 09:42:22 +02:00
Eelco Dolstra
e3d44a3b83
Doh
https://hydra.nixos.org/build/102803044
(cherry picked from commit bda64a2b0f79346012332ed18f5a76388e6d9bae)
2019-10-10 00:14:59 +02:00
Eelco Dolstra
0fb4744467
nix-env: Create ~/.nix-defexpr automatically
(cherry picked from commit c9159f86cc9a2fc07e2ab1217c2d8a8824123df4)
2019-10-10 00:00:58 +02:00
Eelco Dolstra
f66108f738
nix-env: Create ~/.nix-profile automatically
(cherry picked from commit 9348f9291e5d9e4ba3c4347ea1b235640f54fd79)
2019-10-10 00:00:54 +02:00
Eelco Dolstra
2070d55b0b
Force per-user group to a known value
(cherry picked from commit 20eec802ff11dd2b152715cd5c81b756d318219d)
2019-10-09 23:58:59 +02:00
Eelco Dolstra
fe51fbaf81
Typo
(cherry picked from commit 9277e72cb0aac72100c01334fdf25ea79d19052e)
2019-10-09 23:58:55 +02:00
Eelco Dolstra
7c4589854b
Go back to 755 permission on per-user directories
700 is pointless since the store is world-readable anyway. And
per-user/root/channels must be world-readable.

(cherry picked from commit d7bae5680fc26303acb9a9ee1a202f537841a624)
2019-10-09 23:58:51 +02:00
Eelco Dolstra
1c10f739eb
nix-profile.sh: Remove coreutils dependency
(cherry picked from commit 61a6176acaa8522cbcf091a34a663ef45307fef7)
2019-10-09 23:57:41 +02:00
Eelco Dolstra
2522757e83
nix-profile.sh: Don't create .nix-channels
This is already done by the installer, so no need to do it again.

(cherry picked from commit 26762ceb8629af95300c0cc8c372a99282060dc1)
2019-10-09 23:57:35 +02:00
Eelco Dolstra
923b6bd83c
Remove some redundant initialization
(cherry picked from commit c43d9f6131102f2761f22b1ec26f345d357f169c)
2019-10-09 23:57:30 +02:00
Eelco Dolstra
65953789bc
Remove world-writability from per-user directories
'nix-daemon' now creates subdirectories for users when they first
connect.

Fixes #509 (CVE-2019-17365).
Should also fix #3127.

(cherry picked from commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d)
2019-10-09 23:57:25 +02:00
Eelco Dolstra
910b0fcc11
Filter ANSI escape sequences in -L output
Otherwise, builds like NixOS VM tests may leave the terminal in a
weird state and do resets.

(cherry picked from commit 4331eeb13d241dfe2d2e6a01c53915c556cac94f)
2019-10-09 23:57:14 +02:00
Eelco Dolstra
e232bf2b69
Bump version number 2019-10-09 16:26:03 +02:00
Silvan Mosberger
7c9ad4d0d7
docs: Note that tryEval doesn't do deep evaluation
(cherry picked from commit e4ea3e03066a760c8cd462108af99aebaaa44c1b)
2019-10-09 16:25:42 +02:00
Eelco Dolstra
fa028194e9
Disable OpenSSL lock callback on OpenSSL >= 1.1.1
(cherry picked from commit a56b51a0ba7b0d6fdff7fd0127a118185b146f4f)
2019-10-09 16:25:23 +02:00
Julien Tanguy
ff7fcd3805
docs: Fix a typo in github in an example
(cherry picked from commit 92ede15dd902f7c1d2771c194b8bb73fe406840f)
2019-10-09 16:25:17 +02:00
Julien Tanguy
ceddbc921f
docs: Use the explicit ref for fetchGit with a tag
With the merge of #2582, the syntax "tags/1.9" for refs does not work
anymore.
However, the new syntax "refs/tags/1.9" seems to support annotated tags,
such as "refs/tags/2.0".

Closes #2385.

(cherry picked from commit ae244af242ca3621e5a3b9196f27d9fcbf297266)
2019-10-09 16:25:11 +02:00
Alexandre Esteves
62d1c60fb3
Move 'builtins.splitVersion' to position respecting alphabetical order
(cherry picked from commit 9533d85ce009c65722a2addc55b64ee51f15dea3)
2019-10-09 16:24:49 +02:00
zimbatm
f4106e76ff
libstore: don't forward --show-trace
(cherry picked from commit e63c9e73e3e5d1f31fa5065c9ff59f442dd07d0e)
2019-10-09 16:24:35 +02:00
Eelco Dolstra
f3ce4453a6
Don't catch exceptions by value
(cherry picked from commit 893be6f5e36abb58bbaa9c49055a5218114dd514)
(cherry picked from commit bd79c1f6f6391786772a8a79962abe22f374cca4)
2019-10-09 16:24:28 +02:00
Eelco Dolstra
9f53bc33e7
Shut up some warnings
(cherry picked from commit 99e8e58f2de9941353b47ed14fbe4ed76d635519)
(cherry picked from commit 3a022d45993b6fa8c7bf03517a3a3d1a2ab15f4a)
2019-10-09 16:24:23 +02:00
Joseph Lucas
4d83eb6206
Update garbage-collection.xml readability
1. remove a typo space
2. Simplify negative style by using affirmative style

(cherry picked from commit 10bfc5c0d09d5508e3dab4c32f3368caeb5f7f56)
2019-10-09 16:24:10 +02:00
Eelco Dolstra
3919093e9a
Fix fetchTarball with chroot stores
Fixes #2405.

(cherry picked from commit 168a8879165dd0deab1a93d343a6003146f37031)
2019-10-09 16:23:49 +02:00
Sam Doshi
b0ae8fe2db
nix search: remove verbose example
(cherry picked from commit 6f6cb5e3880d0c7a1dd2bc13c2e0be8ce0ae9fa1)
2019-10-09 16:23:39 +02:00