about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-04-13 Convert Settings to the new config systemEelco Dolstra1-4/+4
This makes all config options self-documenting. Unknown or unparseable config settings and --option flags now cause a warning.
2017-04-13 Merge branch 'rework-options' of https://github.com/copumpkin/nixEelco Dolstra1-1/+1
2017-03-31 Merge branch 'remove-perl' of https://github.com/shlevy/nixEelco Dolstra1-1/+1
2017-03-15 Store: Add a method for getting build logsEelco Dolstra1-52/+5
This allows various Store implementations to provide different ways to get build logs. For example, BinaryCacheStore can get the build logs from the binary cache. Also, remove the log-servers option since we can use substituters for this.
2017-03-01 nix-store --import: Fix importing unsigned pathsEelco Dolstra1-1/+1
2017-03-01 Fix assertion failure in nix-store --exportEelco Dolstra1-0/+3
Fixes #1173.
2017-03-01 Handle importing NARs containing files greater than 4 GiBEelco Dolstra1-1/+1
Also templatize readInt() to work for various integer types.
2017-02-22 Explicitly model all settings and fail on unrecognized onesDan Peebles1-1/+1
Previously, the Settings class allowed other code to query for string properties, which led to a proliferation of code all over the place making up new options without any sort of central registry of valid options. This commit pulls all those options back into the central Settings class and removes the public get() methods, to discourage future abuses like that. Furthermore, because we know the full set of options ahead of time, we now fail loudly if someone enters an unrecognized option, thus preventing subtle typos. With some template fun, we could probably also dump the full set of options (with documentation, defaults, etc.) to the command line, but I'm not doing that yet here.
2017-02-07 Remove perl dependency.Shea Levy1-1/+1
Fixes #341
2017-02-07 Remove unnecessary call to topoSortPaths()Eelco Dolstra1-3/+1
exportPaths() already does this.
2016-12-07 Add a hook to run diffoscope when non-determinism is detectedEelco Dolstra1-0/+1
2016-12-07 Keep track of the exact build start/stop timesEelco Dolstra1-1/+1
2016-12-07 Expose enforce-determinism and the result to HydraEelco Dolstra1-1/+6
2016-12-06 nix-store --serve: Suppress log output on stderr when repeating a buildEelco Dolstra1-0/+1
2016-12-06 nix-store --serve: Support setting build-repeatEelco Dolstra1-0/+2
This allows Hydra to test whether builds are reproducible.
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-25/+25
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-25/+25
2016-11-10 Store::computeFSClosure(): Support a set of pathsEelco Dolstra1-7/+5
This way, callers can exploits the parallelism of computeFSClosure() when they have multiple paths that they need the (combined) closure of.
2016-09-21 printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra1-3/+3
2016-08-10 Add a "root" parameter to local storesEelco Dolstra1-2/+6
This makes it easier to create a diverted store, i.e. NIX_REMOTE="local?root=/tmp/root" instead of NIX_REMOTE="local?real=/tmp/root/nix/store&state=/tmp/root/nix/var/nix" NIX_LOG_DIR=/tmp/root/nix/var/log
2016-07-26 makeFixedOutputPath(): Drop superfluous HashType argumentEelco Dolstra1-2/+1
2016-06-02 Allow setting the state directory as a store parameterEelco Dolstra1-14/+20
E.g. "local?store=/tmp/store&state=/tmp/var".
2016-06-01 Make the store directory a member variable of StoreEelco Dolstra1-25/+25
2016-05-31 nix-copy-closure / build-remote.pl: Disable signature checkingEelco Dolstra1-1/+1
This restores the Nix 1.11 behaviour.
2016-05-04 Cleanup: Remove singleton()Eelco Dolstra1-4/+4
2016-05-04 Do compression in a sinkEelco Dolstra1-2/+0
2016-05-04 Add a Store::addToStore() variant that accepts a NAREelco Dolstra1-4/+2
As a side effect, this ensures that signatures are propagated when copying paths between stores. Also refactored import/export to make use of this.
2016-05-04 Remove OpenSSL-based signingEelco Dolstra1-11/+7
2016-04-29 nix-store -l: Simplify implementationEelco Dolstra1-15/+2
2016-04-19 Move path info caching from BinaryCacheStore to StoreEelco Dolstra1-20/+23
Caching path info is generally useful. For instance, it speeds up "nix path-info -rS /run/current-system" (i.e. showing the closure sizes of all paths in the closure of the current system) from 5.6s to 0.15s. This also eliminates some APIs like Store::queryDeriver() and Store::queryReferences().
2016-04-08 Remove failed build cachingEelco Dolstra1-22/+0
This feature was implemented for Hydra, but Hydra no longer uses it.
2016-03-22 Don't overload dumpPath()Eelco Dolstra1-1/+1
2016-03-21 Add Store::dumpPath() methodEelco Dolstra1-1/+3
This allows applying nix-store --verify-path to binary cache stores: NIX_REMOTE=https://cache.nixos.org nix-store --verify-path /nix/store/s5c7...
2016-02-26 importPaths(): Optionally add NARs to binary cache accessorEelco Dolstra1-2/+2
This enables an optimisation in hydra-queue-runner, preventing a download of a NAR it just uploaded to the cache when reading files like hydra-build-products.
2016-02-24 Eliminate reserveSpace flagEelco Dolstra1-1/+1
2016-02-16 Rename ValidPathInfo::hash -> narHash for consistencyEelco Dolstra1-6/+6
2016-02-11 Move addPermRoot into StoreEelco Dolstra1-2/+2
2016-02-04 More of the sameEelco Dolstra1-7/+7
2016-02-04 StoreAPI -> StoreEelco Dolstra1-4/+4
Calling a class an API is a bit redundant...
2016-02-04 Eliminate the "store" global variableEelco Dolstra1-28/+29
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-31 Add build mode to compute fixed-output derivation hashesEelco Dolstra1-0/+1
For example, $ nix-build --hash -A nix-repl.src will build the fixed-output derivation nix-repl.src (a fetchFromGitHub call), but instead of *verifying* the hash given in the Nix expression, it prints out the resulting hash, and then moves the result to its content-addressed location in the Nix store. E.g build produced path ‘/nix/store/504a4k6zi69dq0yjc0bm12pa65bccxam-nix-repl-8a2f5f0607540ffe56b56d52db544373e1efb980-src’ with sha256 hash ‘0cjablz01i0g9smnavhf86imwx1f9mnh5flax75i615ml71gsr88’ The goal of this is to make all nix-prefetch-* scripts unnecessary: we can just let Nix run the real thing (i.e., the corresponding fetch* derivation). Another example: $ nix-build --hash -E 'with import <nixpkgs> {}; fetchgit { url = "https://github.com/NixOS/nix.git"; sha256 = "ffffffffffffffffffffffffffffffffffffffffffffffffffff"; }' ... git revision is 9e7c1a4bbdbe6129dd9dc385776612c307d3d1bb ... build produced path ‘/nix/store/gmsnh9i7x4mb7pyd2ns7n3c9l90jfsi1-nix’ with sha256 hash ‘1188xb621diw89n25rifqg9lxnzpz7nj5bfh4i1y3dnis0dmc0zp’ (Having to specify a fake sha256 hash is a bit annoying...)
2016-01-28 printMissing(): Propagate store argumentEelco Dolstra1-1/+1
2015-12-22 Don't ignore sodium_init() return valueEelco Dolstra1-1/+2
2015-10-29 int2String() -> std::to_string()Eelco Dolstra1-2/+2
2015-10-06 nix-store --serve: Implement log size limitEelco Dolstra1-1/+3
2015-07-23 --version: Print some config infoEelco Dolstra1-1/+7
Such as whether Nix is built with signed binary cache support, and the location of the configuration file.
2015-07-20 More cleanupEelco Dolstra1-16/+11
2015-07-17 OCD: foreach -> C++11 ranged forEelco Dolstra1-148/+142
2015-07-17 Allow remote builds without sending the derivation closureEelco Dolstra1-9/+31
Previously, to build a derivation remotely, we had to copy the entire closure of the .drv file to the remote machine, even though we only need the top-level derivation. This is very wasteful: the closure can contain thousands of store paths, and in some Hydra use cases, include source paths that are very large (e.g. Git/Mercurial checkouts). So now there is a new operation, StoreAPI::buildDerivation(), that performs a build from an in-memory representation of a derivation (BasicDerivation) rather than from a on-disk .drv file. The only files that need to be in the Nix store are the sources of the derivation (drv.inputSrcs), and the needed output paths of the dependencies (as described by drv.inputDrvs). "nix-store --serve" exposes this interface. Note that this is a privileged operation, because you can construct a derivation that builds any store path whatsoever. Fixing this will require changing the hashing scheme (i.e., the output paths should be computed from the other fields in BasicDerivation, allowing them to be verified without access to other derivations). However, this would be quite nice because it would allow .drv-free building (e.g. "nix-env -i" wouldn't have to write any .drv files to disk). Fixes #173.
2015-06-02 Use StoreAPI::verifyStore()Eelco Dolstra1-1/+1