aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/shared.cc
AgeCommit message (Collapse)Author
2021-01-08Support binary unit prefixes in command line argumentsEelco Dolstra
2021-01-08string2Int(): Return std::optionalEelco Dolstra
2021-01-08Remove mkFlag integer specialisationEelco Dolstra
2021-01-06Make sodium a required dependencyEelco Dolstra
2021-01-06Move sodium_init() callEelco Dolstra
2020-10-06Factor out common showBytes()Eelco Dolstra
2020-07-31Merge remote-tracking branch 'origin/master' into markdownEelco Dolstra
2020-07-30unsigned long long -> uint64_tEelco Dolstra
2020-07-24printVersion(): Show system typesEelco Dolstra
2020-07-02move showTrace to new loggerSettingsBen Burdette
2020-06-30comments and cleanupBen Burdette
2020-06-29showTrace flag in loggersBen Burdette
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-15Include only the base name of the program in error messagesEelco Dolstra
2020-06-11Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
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-05-11Merge branch 'master' into errors-phase-2Ben Burdette
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 */ };
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-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.
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.
2018-03-21shared.cc: style: prefer "nullptr" over '(char *)NULL'Will Dietz
2018-03-20execl: cast NULL sentinel to (char *), per man page and compiler warningWill Dietz
From exec(3): > The list of arguments must be terminated by a null pointer, and, since these > are variadic functions, this pointer must be cast (char *) NULL
2018-02-15Set backup MANPATH in case man path isn’t set correctly.Matthew Bauer
Previously, this would fail at startup for non-NixOS installs: nix-env --help The fix for this is to just use "nixManDir" as the value for MANPATH when spawning "man". To test this, I’m using the following: $ nix-build release.nix -A build $ MANPATH= ./result/bin/nix-env --help Fixes #1627
2018-01-16Make show-trace a config settingEelco Dolstra
2017-11-14anchor nix::Exit exceptionWill Dietz
2017-10-24Add --store argument to legacy commandsEelco Dolstra
2017-10-24nix: Respect -I, --arg, --argstrEelco Dolstra
Also, random cleanup to argument handling.
2017-10-24Remove the remote-builds optionEelco Dolstra
This is superfluous since you can now just set "builders" to empty, e.g. "--builders ''".
2017-09-01Fix verbosity level for nix build --dry-runEelco Dolstra
2017-08-31Rename a few configuration optionsEelco Dolstra
In particular, drop the "build-" and "gc-" prefixes which are pointless. So now you can say nix build --no-sandbox instead of nix build --no-build-use-sandbox
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-26nix-build/nix-shell: Eliminate call to nix-instantiate / nix-storeEelco Dolstra
Note that this removes the need for a derivation symlink, so the --drv-path and --add-drv-link flags now do nothing.
2017-06-12On macOS, don't use /var/folders for TMPDIREelco Dolstra
This broke "nix-store --serve".
2017-04-21add helper function to set 'interruptThrown'David McFarland
this fixes a linker failure on cygwin 64 due to some bad interaction between tls and shared libraries. see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697