aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
AgeCommit message (Collapse)Author
2020-05-11fixes to merged codeBen Burdette
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 */ };
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.
2018-05-02Fix some random -Wconversion warningsEelco Dolstra
2018-04-09Export required C++ version in pkgconfig.Shea Levy
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-02-13Merge branch 'plugins' of https://github.com/shlevy/nixEelco Dolstra
2018-02-08Add plugins to make Nix more extensible.Shea Levy
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2018-02-08nix-env: Fix parsing of --systemEelco Dolstra
https://hydra.nixos.org/build/68827814
2018-01-16Make show-trace a config settingEelco Dolstra
2017-11-14anchor nix::Exit exceptionWill Dietz
2017-11-14Make config options available to legacy commandsEelco Dolstra
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-31src/libmain/stack.cc: fix 'ucontext' usage on glibc-2.26Sergei Trofimovich
Build fails as: $ make CXX src/libmain/stack.o src/libmain/stack.cc: In function 'void nix::sigsegvHandler(int, siginfo_t*, void*)': src/libmain/stack.cc:21:21: error: 'ucontext' was not declared in this scope sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP]; ^~~~~~~~ src/libmain/stack.cc:21:21: note: suggested alternative: 'ucontext_t' sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP]; ^~~~~~~~ ucontext_t It's caused by upstream rename: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9 which basically changes typedef struct ucontext {} ucontext_t; to typedef struct ucontext_t {} ucontext_t; The change uses ucontext_t. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
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-07-14Shut up a memory leak warningEelco Dolstra
2017-06-12On macOS, don't use /var/folders for TMPDIREelco Dolstra
This broke "nix-store --serve".
2017-06-07Don't show flags from config settings in "nix --help"Eelco Dolstra
2017-04-24Factor out --jsonEelco Dolstra
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
2017-04-14Minor cleanupEelco Dolstra
2017-04-13Convert Settings to the new config systemEelco Dolstra
This makes all config options self-documenting. Unknown or unparseable config settings and --option flags now cause a warning.