aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
AgeCommit message (Collapse)Author
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-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.
2017-04-13Initialise loggerEelco Dolstra
2017-03-16Remove "killing process <pid>" messagesEelco Dolstra
They convey no useful information.
2017-02-28Support auto-configuration of build-max-jobsEelco Dolstra
"build-max-jobs" and the "-j" option can now be set to "auto" to use the number of CPUs in the system. (Unlike build-cores, it doesn't use 0 to imply auto-configuration, because a) magic values are a bad idea in general; b) 0 is a legitimate value used to disable local building.) Fixes #1198.
2017-02-16Move netrcFile to SettingsEelco Dolstra
Also get rid of Settings::processEnvironment(), it appears to be useless.
2017-02-08Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not every compilation unit includes config.h, we currently compile half of Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS unset. This causes major havoc with the Settings class on e.g. 32-bit ARM, where different compilation units disagree with the struct layout. E.g.: diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc @@ -166,6 +166,8 @@ void Settings::update() _get(useSubstitutes, "build-use-substitutes"); + fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); _get(buildUsersGroup, "build-users-group"); diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn) void RemoteStore::setOptions(Connection & conn) { + fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); conn.to << wopSetOptions Gave me: at Settings::update(): &useSubstitutes = 0xb6e5c5cb at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7 That was not a fun one to debug!
2017-02-01Restore default signal handling in child processesEelco Dolstra
In particular, this fixes Ctrl-C in nix-shell sessions.
2017-01-26Fix interrupt handlingEelco Dolstra
2017-01-19Kill builds when we get EOF on the log FDEelco Dolstra
This closes a long-time bug that allowed builds to hang Nix indefinitely (regardless of timeouts) simply by doing exec > /dev/null 2>&1; while true; do true; done Now, on EOF, we just send SIGKILL to the child to make sure it's really gone.
2017-01-17Handle SIGINT etc. via a sigwait() signal handler threadEelco Dolstra
This allows other threads to install callbacks that run in a regular, non-signal context. In particular, we can use this to signal the downloader thread to quit. Closes #1183.
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2016-10-12Shut up some warningsEelco Dolstra
2016-09-21printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra
2016-08-10Remove $NIX_DB_DIREelco Dolstra
This variable has no reason to exist, given $NIX_STATE_DIR.
2016-07-11Modernize AutoCloseFDShea Levy
2016-04-25Show the log tail when a build failsEelco Dolstra
If --no-build-output is given (which will become the default for the "nix" command at least), show the last 10 lines of the build output if the build fails.
2016-04-25Remove --print-build-traceEelco Dolstra
This was added to support Hydra, but Hydra no longer uses it.