about summary refs log tree commit diff
path: root/src/nix-store
AgeCommit message (Collapse)AuthorFilesLines
2018-08-03 Make adding paths via nix-store --serve run in constant memoryEelco Dolstra1-0/+22
It adds a new operation, cmdAddToStoreNar, that does the same thing as the corresponding nix-daemon operation, i.e. call addToStore(). This replaces cmdImportPaths, which has the major issue that it sends the NAR first and the store path second, thus requiring us to store the incoming NAR either in memory or on disk until we decide what to do with it. For example, this reduces the memory usage of $ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' /nix/store/95cwv4q54dc6giaqv6q6p4r02ia2km35-blender-2.79 from 267 MiB to 12 MiB. Probably fixes #1988.
2018-08-03 cmdDumpStorePath: Support chroot storesEelco Dolstra1-1/+1
2018-05-02 Fix some random -Wconversion warningsEelco Dolstra1-2/+1
2018-03-02 Merge branch 'write-failure-fixes' of git://github.com/lheckemann/nixShea Levy1-0/+2
2018-02-13 Fix #1762Linus Heckemann1-0/+2
nix-store --export, nix-store --dump, and nix dump-path would previously fail silently if writing the data out failed, because a) FdSink::write ignored exceptions, and b) the commands relied on FdSink's destructor, which ignores exceptions, to flush the data out. This could cause rather opaque issues with installing nixos, because nix-store --export would happily proceed even if it couldn't write its data out (e.g. if nix-store --import on the other side of the pipe failed). This commit adds tests that expose these issues in the nix-store commands, and fixes them for all three.
2018-02-08 Add plugins to make Nix more extensible.Shea Levy1-0/+2
All plugins in plugin-files will be dlopened, allowing them to statically construct instances of the various Register* types Nix supports.
2018-02-03 Remove nix-build --hashEelco Dolstra1-1/+0
Instead, if a fixed-output derivation produces has an incorrect output hash, we now unconditionally move the outputs to the path corresponding with the actual hash and register it as valid. Thus, after correcting the hash in the Nix expression (e.g. in a fetchurl call), the fixed-output derivation doesn't have to be built again. It would still be good to have a command for reporting the actual hash of a fixed-output derivation (instead of throwing an error), but "nix-build --hash" didn't do that.
2017-10-25 Pass lists/attrsets to bash as (associative) arraysEelco Dolstra1-10/+1
2017-09-08 LegacySSHStore: Include signatures etc.Eelco Dolstra1-0/+2
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim2-25/+25
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-04 Support base-64 hashesEelco Dolstra1-4/+4
Also simplify the Hash API. Fixes #1437.
2017-07-03 Replace a few bool flags with enumsEelco Dolstra1-4/+4
Functions like copyClosure() had 3 bool arguments, which creates a severe risk of mixing up arguments. Also, implement copyClosure() using copyPaths().
2017-04-26 DohEelco Dolstra1-1/+1
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 Remove dependency on "curl" binaryEelco Dolstra1-2/+0
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 Provide default implementations for a couple of Store methodsEelco Dolstra1-23/+0
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 Dolstra2-1/+3
This allows Hydra to test whether builds are reproducible.
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra2-26/+26
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux2-26/+26
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 Dolstra3-39/+31
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