aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-12-05Consistent capitalisationEelco Dolstra
2022-10-25Complete genericClosure testsGuillaume Maudoux
2022-10-25Rework error throwing, and test itGuillaume Maudoux
2022-10-23Try to please clang with convoluted templatesGuillaume Maudoux
2022-10-22Introduce an Error builder to tackle complexityGuillaume Maudoux
2022-10-20Rollback unneeded throwFrameErrorWithTrace functionGuillaume Maudoux
2022-10-20Fix context message being printed twice with forceStringNoCtxGuillaume Maudoux
2022-10-20Reword incomparable types messageGuillaume Maudoux
2022-10-20Revert custom position of 'if' blocksGuillaume Maudoux
2022-10-17Initial frames supportGuillaume Maudoux
2022-10-16Merge remote-tracking branch 'origin/master' into coerce-stringGuillaume Maudoux
2022-10-14Merge pull request #7168 from NixOS/rosetta-testEelco Dolstra
Improve Rosetta detection
2022-10-14libmain: Make the entire stack overflow handler pluggableRobert Hensing
2022-10-14libmain: Add extraStackOverflowHandlerRobert Hensing
2022-10-14Remove useless debug statementsEelco Dolstra
We haven't parsed the '-v' command line flags yet when this code executes, so we can't actually get debug output here.
2022-10-14Use /usr/bin/trueEelco Dolstra
2022-10-13Fix error display if execve() in the builder failsEelco Dolstra
After we've send "\2\n" to the parent, we can't send a serialized exception anymore. It will show up garbled like $ nix-build --store /tmp/nix --expr 'derivation { name = "foo"; system = "x86_64-linux"; builder = "/foo/bar"; }' this derivation will be built: /nix/store/xmdip0z5x1zqpp6gnxld3vqng7zbpapp-foo.drv building '/nix/store/xmdip0z5x1zqpp6gnxld3vqng7zbpapp-foo.drv'... ErrorErrorEexecuting '/foo/bar': No such file or directory error: builder for '/nix/store/xmdip0z5x1zqpp6gnxld3vqng7zbpapp-foo.drv' failed with exit code 1
2022-10-13Improve Rosetta detectionEelco Dolstra
Turns out that one of those *.plist files can exist even if Rosetta is not installed. So let's just try to run an x86_64-darwin binary directly.
2022-10-13Fix clang warningsEelco Dolstra
2022-10-13Merge pull request #7140 from crawford/chroot-storeEelco Dolstra
Make warning about chroot store location more accurate
2022-10-12Make warning about chroot store location more accurateSteam Deck User
While trying to use an alternate directory for my Nix installation, I noticed that nix's output didn't reflect the updated state directory. This patch corrects that and now prints the warning before attempting to create the directory (if the directory creation fails, it wouldn't have been obvious why nix was attempting to create the directory in the first place). With this patch, I now get the following warning: warning: '/home/deck/.var/app/org.nixos.nix/var/nix' does not exist, so Nix will use '/home/deck/.local/share/nix/root' as a chroot store
2022-10-12Move some options into a misc categoryEelco Dolstra
This unclutters the per-command options a bit by moving out some global options.
2022-10-12Merge branch 'print-common-flags' of github.com:Hoverbear/nixEelco Dolstra
2022-10-12Merge pull request #7149 from amjoseph-nixpkgs/pr/intersectAttrs/valuesEelco Dolstra
parseDrvName: remove doc/impl discrepancy, add test covering the gap
2022-10-08src/libexpr/primops.cc: parseDrvName: make documentation follow implementationAdam Joseph
The documentation for `parseDrvName` does not agree with the implementation when the derivation name contains a dash which is followed by something that is neither a letter nor a digit. This commit corrects the documentation to agree with the implementation.
2022-10-07Print common flags in --helpAna Hobden
2022-10-05Merge pull request #6870 from ↵Valentin Gagarin
amjoseph-nixpkgs/pr/doc/explain-local-remote-binary-substituter
2022-09-30Merge pull request #7080 from squalus/nar-close-fileEelco Dolstra
archive: check close errors when extracting nars
2022-09-27nix-build: remove unused --add-root argLinus Heckemann
Fixes #1982
2022-09-26Merge pull request #7089 from NixOS/mention-accept-flake-config-in-warningEelco Dolstra
Mention `--accept-flake-config` in the related warning
2022-09-24src/libexpr/primops.cc: correct definition for intersectAttrsAdam Joseph
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-24Merge pull request #7010 from edolstra/ignore-shellThéophane Hufschmitt
nix develop: Ignore stdenv's $SHELL
2022-09-24Merge pull request #7078 from obsidiansystems/trustworthy-signatureThéophane Hufschmitt
"valid signature" -> "signature by a trusted key"
2022-09-24Merge pull request #7079 from matthewbauer/allow-untrusted-settingsThéophane Hufschmitt
Allow pass max-silent-time and build-poll-interval to daemon untrusted
2022-09-24Mention `--accept-flake-config` in the related warningThéophane Hufschmitt
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-24Merge pull request #7059 from NixOS/remove-useless-ca-file-messageEelco Dolstra
Remove a useless debug message in filetransfer.cc
2022-09-23Apply suggestions from code reviewJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Rune K. Svendsen <runesvend@gmail.com>
2022-09-22archive: check close errors when extracting narssqualus
2022-09-22Allow pass max-silent-time and build-poll-interval to daemon untrustedMatthew Bauer
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-22Dodge "trusted" vs "trustworthy" by being explicit John Ericson
Hopefully this is best!
2022-09-22"valid signature" -> "trustworthy signature"John Ericson
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-21Merge pull request #7070 from alyssais/repl-historyThéophane Hufschmitt
nix repl: warn if creating dir for history fails
2022-09-20nix repl: warn if creating dir for history failsAlyssa Ross
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-19Improve durability of schema version file writessqualus
- 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-19Remove a useless debug message in filetransfer.ccThéophane Hufschmitt
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-16fetchurl.nix: change other use of __impureAdam Joseph
2022-09-16Update src/libexpr/fetchurl.nixAdam Joseph
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2022-09-16libexpr/fetchurl.nix: allow __impure fetchAdam Joseph
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-13Trim option descriptionsEelco Dolstra
This removes unintended blank lines in Markdown when the description is a multiline string literal.
2022-09-13RunPager: Stop the progress barEelco Dolstra
In particular, the progress bar was interfering with 'less' rendering in '--help' (e.g. run 'nix --help' and hit '/' to search).