about summary refs log tree commit diff
path: root/src/libmain/shared.cc
AgeCommit message (Collapse)AuthorFilesLines
2016-02-04 StoreAPI -> StoreEelco Dolstra1-2/+2
Calling a class an API is a bit redundant...
2016-02-04 Eliminate the "store" global variableEelco Dolstra1-5/+4
Also, move a few free-standing functions into StoreAPI and Derivation. Also, introduce a non-nullable smart pointer, ref<T>, which is just a wrapper around std::shared_ptr ensuring that the pointer is never null. (For reference-counted values, this is better than passing a "T&", because the latter doesn't maintain the refcount. Usually, the caller will have a shared_ptr keeping the value alive, but that's not always the case, e.g., when passing a reference to a std::thread via std::bind.)
2016-01-28 printMissing(): Propagate store argumentEelco Dolstra1-3/+3
2015-07-23 --version: Print some config infoEelco Dolstra1-0/+14
Such as whether Nix is built with signed binary cache support, and the location of the configuration file.
2015-07-20 Support systemd log severity prefixesEelco Dolstra1-0/+4
This is mostly useful for hydra-queue-runner.
2015-05-21 nix-collect-garbage: Call collectGarbage() internallyEelco Dolstra1-0/+15
2015-01-02 Allow $NIX_PAGER to override $PAGEREelco Dolstra1-4/+5
2014-12-14 PedantryEelco Dolstra1-1/+1
2014-12-14 Merge branch 'cygwin-master' of https://github.com/ternaris/nixEelco Dolstra1-0/+1
2014-12-12 Don't abort if we get a signal while waiting for the pagerEelco Dolstra1-4/+8
2014-12-10 Provide default pagersEelco Dolstra1-3/+8
Borrowed from systemd.
2014-12-10 Revert "Use posix_spawn to run the pager"Eelco Dolstra1-30/+8
This reverts commit d34d2b2bbf784c0bb420a50905af25e02c6e4989.
2014-12-09 Explicitly include required C headersMarko Durkovic1-0/+1
2014-12-05 Define ‘environ’Eelco Dolstra1-0/+2
http://hydra.nixos.org/build/17690555
2014-12-05 Use posix_spawn to run the pagerEelco Dolstra1-8/+30
In low memory environments, "nix-env -qa" failed because the fork to run the pager hit the kernel's overcommit limits. Using posix_spawn gets around this. (Actually, you have to use posix_spawn with the undocumented POSIX_SPAWN_USEVFORK flag, otherwise it just uses fork/exec...)
2014-10-14 Remove redundant space in usage errorsEelco Dolstra1-1/+1
2014-09-26 printMissing(): Print derivations in approximate build orderEelco Dolstra1-6/+9
2014-08-20 Flush std::cout before closing stdoutEelco Dolstra1-0/+1
2014-08-20 Provide reasonable default flags for $LESSEelco Dolstra1-1/+2
Borrowed from systemd.
2014-08-20 Use proper quotes everywhereEelco Dolstra1-9/+9
2014-08-20 Add some colorEelco Dolstra1-6/+5
2014-08-20 nix-store -l: Automatically pipe output into $PAGEREelco Dolstra1-0/+40
2014-08-13 Handle compound single dash options properlyEelco Dolstra1-15/+14
So now nix-instantiate --eval -E '{x}: x' --argstr x -xyzzy correctly prints "-xyzzy", rather than giving an error. Issue NixOS/hydra#176.
2014-08-13 Refactor option handlingEelco Dolstra1-48/+34
2014-08-13 Remove pointless NIX_LOG_TYPE environment variableEelco Dolstra1-4/+0
2014-07-31 Restore default SIGPIPE handler before invoking ‘man’Eelco Dolstra1-3/+3
Fixes NixOS/nixpkgs#3410.
2014-05-23 Ugly hack to allow --argstr values starting with a dashEelco Dolstra1-0/+7
Fixes #265.
2014-03-29 restoreSIGPIPE(): Fill in sa_maskEelco Dolstra1-1/+1
Issue #231.
2014-02-08 Add download-via-ssh substituterShea Levy1-0/+3
This substituter connects to a remote host, runs nix-store --serve there, and then forwards substituter commands on to the remote host and sends their results to the calling program. The ssh-substituter-hosts option can be specified as a list of hosts to try. This is an initial implementation and, while it works, it has some limitations: * Only the first host is used * There is no caching of query results (all queries are sent to the remote machine) * There is no informative output (such as progress bars) * Some failure modes may cause unhelpful error messages * There is no concept of trusted-ssh-substituter-hosts Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-21 Merge branch 'master' into makeEelco Dolstra1-0/+5
Conflicts: src/libexpr/eval.cc
2013-12-20 nix-shell: Don't warn about the lack of a GC rootEelco Dolstra1-0/+5
2013-11-23 Drop the dependency on libgc in libmainEelco Dolstra1-20/+0
Instead, libexpr now depends on libgc. This means commands like nix-store that don't do any evaluation no longer require libgc.
2013-11-12 Make function calls show up in stack traces againEelco Dolstra1-6/+3
Note that adding --show-trace prevents functions calls from being tail-recursive, so an expression that evaluates without --show-trace may fail with a stack overflow if --show-trace is given.
2013-10-02 Report OOM errors betterEelco Dolstra1-0/+3
2013-07-30 Detect stack overflowsEelco Dolstra1-0/+7
Previously, if the Nix evaluator gets a stack overflow due to a deep or infinite recursion in the Nix expression, the user gets an unhelpful message ("Segmentation fault") that doesn't indicate that the problem is in the user's code rather than Nix itself. Now it prints: error: stack overflow (possible infinite recursion) This only works on x86_64-linux and i686-linux. Fixes #35.
2013-03-08 Revert "Prevent config.h from being clobbered"Eelco Dolstra1-5/+2
This reverts commit 28bba8c44f484eae38e8a15dcec73cfa999156f6.
2013-03-07 Prevent config.h from being clobberedEelco Dolstra1-2/+5
2013-02-19 build-remote: Use the --quiet flagEelco Dolstra1-5/+2
‘--option verbosity 0’ doesn't actually do anything.
2012-12-11 On SQLITE_BUSY, wait a random amount of timeEelco Dolstra1-0/+6
If all contending processes wait a fixed amount of time (100 ms), there is a good probability that they'll just collide again.
2012-11-27 Add builtin constants ‘langVersion’ and ‘nixVersion’Eelco Dolstra1-1/+1
The integer constant ‘langVersion’ denotes the current language version. It gets increased every time a language feature is added/changed/removed. It's currently 1. The string constant ‘nixVersion’ contains the current Nix version, e.g. "1.2pre2980_9de6bc5".
2012-11-20 nix-store -r: Add ‘--ignore-unknown’ flagEelco Dolstra1-0/+7
This flag causes paths that do not have a known substitute to be quietly ignored. This is mostly useful for Charon, allowing it to speed up deployment by letting a machine use substitutes for all substitutable paths, instead of uploading them. The latter is frequently faster, e.g. if the target machine has a fast Internet connection while the source machine is on a slow ADSL line.
2012-10-03 Drop support for running nix-worker in "slave" modeEelco Dolstra1-57/+1
AFAIK nobody uses this, setuid binaries are evil, and there is no good reason why people can't just run the daemon.
2012-10-03 When ‘--help’ is given, just run ‘man’ to show the manual pageEelco Dolstra1-0/+9
I.e. do what git does. I'm too lazy to keep the builtin help text up to date :-) Also add ‘--help’ to various commands that lacked it (e.g. nix-collect-garbage).
2012-08-27 Merge branch 'master' into no-manifestsEelco Dolstra1-10/+0
2012-08-24 Include the output name in the GC root linkEelco Dolstra1-10/+0
Output names are now appended to resulting GC symlinks, e.g. by nix-build. For backwards compatibility, if the output is named "out", nothing is appended. E.g. doing "nix-build -A foo" on a derivation that produces outputs "out", "bin" and "dev" will produce symlinks "./result", "./result-bin" and "./result-dev", respectively.
2012-07-31 Add an option ‘build-fallback’ (equivalent to the --fallback flag)Eelco Dolstra1-1/+1
2012-07-30 Refactor settings processingEelco Dolstra1-19/+28
Put all Nix configuration flags in a Settings object.
2012-07-30 WhitespaceEelco Dolstra1-7/+7
2012-03-13 Ensure that Perl processes delete their entry in the temproots directoryEelco Dolstra1-10/+0
By moving the destructor object to libstore.so, it's also run when download-using-manifests and nix-prefetch-url exit. This prevents them from cluttering /nix/var/nix/temproots with stale files.
2012-03-05 nix-worker: put the pid of the caller in argv[1]Eelco Dolstra1-1/+3
This is useful for debugging.