aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
AgeCommit message (Collapse)Author
2020-08-10Always reset ANSI colors in progress-bar lineMaximilian Bosch
When having a message like `waiting for a machine to build X` and building with `nix build -L`, the log-prefix is always colored yellow[1] on a small terminal-width as everything (including the ANSI color-reset) is stripped away. To work around that problem, this patch explicitly adds an `ANSI_NORMAL` to the end of the line. [1] https://imgur.com/a/FjtJOk3
2020-07-30unsigned long long -> uint64_tEelco Dolstra
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-02move showTrace to new loggerSettingsBen Burdette
2020-06-30comments and cleanupBen Burdette
2020-06-29showTrace flag in loggersBen Burdette
2020-06-29Fix bash completionEelco Dolstra
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-25showTrace flag for ErrorInfo; showTrace test.Ben Burdette
2020-06-24re-enable --show-trace checkBen Burdette
2020-06-19addErrorTraceBen Burdette
2020-06-17Mention number of derivations to be build/fetched in outputJoe Hermaszewski
Also correct grammar for the case of a single derivation.
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-15Include only the base name of the program in error messagesEelco Dolstra
2020-06-15Always hide the progress bar on exitEelco Dolstra
2020-06-15Improve "waiting for locks" messagesEelco Dolstra
These are now shown in the progress bar. Closes #3577.
2020-06-15Remove trailing whitespaceEelco Dolstra
2020-06-11Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-06-11Shut up warningEelco Dolstra
2020-06-11Style fixesEelco Dolstra
2020-06-08Move progress-bar.cc to libmainregnat
Needed so that we can include it as a logger in loggers.cc without adding a dependency on nix This also requires moving names.hh to libutil to prevent a circular dependency between libmain and libexpr
2020-06-08Style fixesEelco Dolstra
2020-06-08Unify the printing of the logs between bar-with-logs and rawregnat
Make the printing of the build logs systematically go through the logger, and replicate the behavior of `no-build-output` by having two different loggers (one that prints the build logs and one that doesn't)
2020-06-08Make the logger customisableregnat
Add a new `--log-format` cli argument to change the format of the logs. The possible values are - raw (the default one for old-style commands) - bar (the default one for new-style commands) - bar-with-logs (equivalent to `--print-build-logs`) - internal-json (the internal machine-readable json format)
2020-05-11fixes to merged codeBen Burdette
2020-05-11Merge branch 'master' into errors-phase-2Ben Burdette
2020-05-10SimplifyEelco Dolstra
2020-05-10nix: Implement basic bash completionEelco Dolstra
2020-05-04Flag: Use designated initializersEelco Dolstra
2020-05-04separate msgs instead of appending to what()Ben Burdette
2020-05-03convert some printError calls to logErrorBen Burdette
2020-04-24all things error to error.hhBen Burdette
2020-04-21remove 'format' from Error constructor callsBen Burdette
2020-04-15Merge pull request #3458 from zimbatm/nix-user-conf-dirEelco Dolstra
NIX_USER_CONF_FILES
2020-04-14add NIX_USER_CONF_FILESzimbatm
Motivation: maintain project-level configuration files. Document the whole situation a bit better so that it corresponds to the implementation, and add NIX_USER_CONF_FILES that allows overriding which user files Nix will load during startup.
2020-04-12never use /var/folders for TMPDIR on darwinDaiderd Jordan
This doesn't just cause problems for nix-store --serve but also results in certain build failures. Builds that use unix domain sockets in their tests often fail because the /var/folders prefix already consumes more than half of the maximum length of socket paths. struct sockaddr_un { sa_family_t sun_family; /* AF_UNIX */ char sun_path[108]; /* Pathname */ };
2020-03-30Remove global -I flagsEelco Dolstra
(cherry picked from commit 2c692a3b144523bca68dd6de618124ba6c9bb332)
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-11-26Fix macOS buildEelco Dolstra
https://hydra.nixos.org/build/107457009
2019-09-04Disable OpenSSL lock callback on OpenSSL >= 1.1.1Eelco Dolstra
2019-08-28Merge pull request #2921 from matthewbauer/handle-sigwinchEelco Dolstra
Handle SIGWINCH in main thread
2019-06-25Automatically use --no-net if there are no network interfacesEelco Dolstra
(cherry picked from commit 04a59769963fe2a28d10ba15de743fe499333c80)
2019-06-24Add '--no-net' convenience flagEelco Dolstra
This flag * Disables substituters. * Sets the tarball-ttl to infinity (ensuring e.g. that the flake registry and any downloaded flakes are considered current). * Disables retrying downloads and sets the connection timeout to the minimum. (So it doesn't completely disable downloads at the moment.) (cherry picked from commit 8ea842260b4fd93315d35c5ba94b1ff99ab391d8)
2019-06-15nix: Support -j flagEelco Dolstra
2019-06-05Just enable hack on macOSMatthew Bauer
This is not needed on linux at all! Tried to explain as much as I understand with the problem.
2019-06-05Handle SIGWINCH in main threadMatthew Bauer
For the SIGWINCH signal to be caught, it needs to be set in sigaction on the main thread. Previously, this was broken, and updateWindowSize was never being called. Tested on macOS 10.14.
2019-03-14pkg-config files: Use c++17Eelco Dolstra
2019-01-05Remove mentions of `libformat`, it no longer existsJohn Ericson
2018-11-20Fix typoEelco Dolstra
2018-05-30Modularize config settingsEelco Dolstra
Allow global config settings to be defined in multiple Config classes. For example, this means that libutil can have settings and evaluator settings can be moved out of libstore. The Config classes are registered in a new GlobalConfig class to which config files etc. are applied. Relevant to https://github.com/NixOS/nix/issues/2009 in that it removes the need for ad hoc handling of useCaseHack, which was the underlying cause of that issue.