aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-14Merge pull request #4351 from Ma27/json-errtraceEelco Dolstra
primops/fromJSON: add error position in case of parse error
2020-12-13primops/fromJSON: add error position in case of parse errorMaximilian Bosch
This makes it easier to track down where invalid JSON was passed to `builtins.fromJSON`.
2020-12-13Merge pull request #4352 from jonringer/allow-private-cachesEelco Dolstra
treat s3 permission errors as file-not-found
2020-12-11treat s3 permission errors as file-not-foundMichael Bishop
Signed-off-by: Jonathan Ringer <jonringer117@gmail.com>
2020-12-11Merge pull request #4350 from NixOS/ca/fix-build-with-nix-commandEelco Dolstra
Fix the `nix` command with CA derivations
2020-12-11Fix the `nix` command with CA derivationsregnat
Prevents a crash because most `nix` subcommands assumed that derivations know their output path, which isn't the case for CA derivations
2020-12-10nix store make-content-addressable: Show rewritten pathEelco Dolstra
2020-12-10Add lvlNotice log levelEelco Dolstra
This is like syslog's LOG_NOTICE: "normal, but significant, condition".
2020-12-09Merge pull request #4343 from tweag/fix-osx-ciEelco Dolstra
Use no substituers by default in the tests
2020-12-09Use no substituers by default in the testsregnat
Otherwise https://cache.nixos.org is chosen by default, causing the OSX testsuite to hang inside the sandbox. (In a way, this is probably rugging an actual bug under the carpet as Nix should be able to gracefully timeout in such a case, but that's beyond mac OSX-fu)
2020-12-09Merge pull request #4342 from tweag/fix-remote-build-hookEelco Dolstra
fix remote build hook
2020-12-09Merge pull request #4319 from Ma27/store-v6-addrEelco Dolstra
libstore/openStore: fix stores with IPv6 addresses
2020-12-09libstore/openStore: fix stores with IPv6 addressesMaximilian Bosch
In `nixStable` (2.3.7 to be precise) it's possible to connect to stores using an IPv6 address: nix ping-store --store ssh://root@2001:db8::1 This is also useful for `nixops(1)` where you could specify an IPv6 address in `deployment.targetHost`. However, this behavior is broken on `nixUnstable` and fails with the following error: $ nix store ping --store ssh://root@2001:db8::1 don't know how to open Nix store 'ssh://root@2001:db8::1' This happened because `openStore` from `libstore` uses the `parseURL` function from `libfetchers` which expects a valid URL as defined in RFC2732. However, this is unsupported by `ssh(1)`: $ nix store ping --store 'ssh://root@[2001:db8::1]' cannot connect to 'root@[2001:db8::1]' This patch now allows both ways of specifying a store (`root@2001:db8::1`) and also `root@[2001:db8::1]` since the latter one is useful to pass query parameters to the remote store. In order to achieve this, the following changes were made: * The URL regex from `url-parts.hh` now allows an IPv6 address in the form `2001:db8::1` and also `[2001:db8::1]`. * In `libstore`, a new function named `extractConnStr` ensures that a proper URL is passed to e.g. `ssh(1)`: * If a URL looks like either `[2001:db8::1]` or `root@[2001:db8::1]`, the brackets will be removed using a regex. No additional validation is done here as only strings parsed by `parseURL` are expected. * In any other case, the string will be left untouched. * The rules above only apply for `LegacySSHStore` and `SSHStore` (a.k.a `ssh://` and `ssh-ng://`). Unresolved questions: * I'm not really sure whether we want to allow both variants of IPv6 addresses in the URL parser. However it should be noted that both seem to be possible according to RFC2732: > This document incudes an update to the generic syntax for Uniform > Resource Identifiers defined in RFC 2396 [URL]. It defines a syntax > for IPv6 addresses and allows the use of "[" and "]" within a URI > explicitly for this reserved purpose. * Currently, it's not supported to specify a port number behind the hostname, however it seems as this is not really supported by the URL parser. Hence, this is probably out of scope here.
2020-12-09Store the final drv outputs in memory when building remotelyregnat
The `DerivationGoal` has a variable storing the “final” derivation output paths that is used (amongst other things) to fill the environment for the post build hook. However this variable wasn't set when the build-hook is used, causing a crash when both hooks are used together. Fix this by setting this variable (from the informations in the db) after a run of the post build hook.
2020-12-09Test the post-build-hook with remote buildersregnat
Regression test for #4245
2020-12-09Revert "Re-query for the derivation outputs in the post-build-hook"regnat
This reverts commit 1b1e0760335832c87516b9103b670b34662d5daf. Using `queryPartialDerivationOutputMap` assumes that the derivation exists locally which isn't the case for remote builders.
2020-12-08Merge pull request #4325 from tweag/hide-local-store-sql-statementsEelco Dolstra
Hide the sqlite statements declarations for the local store
2020-12-08Hide the sqlite statements declarations for the local storeregnat
These have no need to be in the public interface and it causes spurious rebuilds each time one wants to add or remove a new statement.
2020-12-08Merge pull request #4326 from tweag/fix-post-build-hook-and-remote-buildersEelco Dolstra
Re-query for the derivation outputs in the post-build-hook
2020-12-08Re-query for the derivation outputs in the post-build-hookregnat
We can't assume that the runtime state knows about them as they might have been built remotely, in which case we must query the db again to get them.
2020-12-07Merge pull request #4305 from matthewbauer/rosetta2-checkEelco Dolstra
Check for rosetta 2 support before installing x86_64-darwin Nix
2020-12-07Merge pull request #4321 from matthewbauer/always-default-cache-nixos-orgEelco Dolstra
Always default to cache.nixos.org even when different nix store dir
2020-12-06Always default to cache.nixos.org even when different nix store dirMatthew Bauer
Since 0744f7f, it is now useful to have cache.nixos.org in substituers even if /nix/store is not the Nix Store Dir. This can always be overridden via configuration, though.
2020-12-05Merge pull request #4318 from matthewbauer/add-slash-to-trusted-binary-cacheEelco Dolstra
Canonicalize binary caches with ‘/’ when one is missing
2020-12-05Merge pull request #4316 from stephank/aws-sdk-compatEelco Dolstra
Fix compatibility with newer AWS SDKs
2020-12-04Canonicalize binary caches with ‘/’ when one is missingMatthew Bauer
This checks if there is a trusted substituter with a slash, so trusting https://cache.nixos.org also implies https://cache.nixos.org/ is trusted.
2020-12-04Use com.apple.oahd.plist for rosetta 2 detectionMatthew Bauer
2020-12-04Fix compatibility with newer AWS SDKsStéphan Kochen
Tested against AWS SDK 1.8.99. Fixes #3201.
2020-12-04Merge pull request #4314 from tweag/less-noisy-make-docEelco Dolstra
Make `make install` less noisy
2020-12-04Make `make install` less noisyregnat
Remove the printing and useless output of a couple of commands when running `make install`
2020-12-04Merge pull request #4311 from matthewbauer/static-nix-supportEelco Dolstra
Include static "nix" binary in Hydra build products
2020-12-03Include static "nix" binary in Hydra build productsMatthew Bauer
This allows users to get Nix from Hydra via a stable url like https://hydra.nixos.org/build/132078238/download/1/nix
2020-12-04Split 'nix store add-to-store' into 'add-path' and 'add-file'Eelco Dolstra
This makes it consistent with 'nix hash <path|file>'.
2020-12-03Merge pull request #3858 from edolstra/group-commandsEelco Dolstra
Group 'nix' subcommands
2020-12-03TypoEelco Dolstra
2020-12-03Move most store-related commands to 'nix store'Eelco Dolstra
2020-12-03Add 'nix nar dump-path'Eelco Dolstra
This only differs from 'nix store dump-path' in that the path doesn't need to be a store path.
2020-12-03Add deprecated aliases for renamed commandsEelco Dolstra
2020-12-03Add FIXMEEelco Dolstra
2020-12-03Move NAR-related commands to 'nix nar'Eelco Dolstra
2020-12-03Introduce 'nix store' commandEelco Dolstra
2020-12-03Allow registering subcommands of subcommandsEelco Dolstra
2020-12-03Move 'nix hash-*' and 'nix to-*' to 'nix hash'Eelco Dolstra
From the 'nix' UX review.
2020-12-03Remove 'dist' targetEelco Dolstra
We're not producing source tarballs anymore so this has been bitrotting.
2020-12-03nix add-to-store: Move markdown docs into a separate fileEelco Dolstra
2020-12-03Make doc() return arbitrary Markdown rather than the contents of the ↵Eelco Dolstra
"Description" section Thus we can return the examples section (and any other sections) from doc() and don't need examples() anymore.
2020-12-03Merge pull request #4308 from tweag/properly-test-early-cutoffEelco Dolstra
Properly test the early cutoff for CA derivations
2020-12-03Merge pull request #4304 from NixOS/separate-manpagesEelco Dolstra
Separate manpages for 'nix' subcommands
2020-12-03Properly test early cutoff with CA derivationsregnat
Build things with a different seed each time to make sure that it works despite the different drvs
2020-12-03Don't fail early when -j0 is passedregnat
If the build closure contains some CA derivations, then we can't know ahead-of-time that we won't build anything as early-cutoff might come-in at a laster stage