aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
AgeCommit message (Collapse)Author
2020-06-08Unify the printing of the logs between bar-with-logs and rawregnat
Make the printing of the build logs systematically go through the logger, and replicate the behavior of `no-build-output` by having two different loggers (one that prints the build logs and one that doesn't)
2020-06-04Add error message when FileIngestionMethod is out of boundsMatthew Bauer
bool coerces anything >0 to true, but in the future we may have other file ingestion methods. This shows a better error message when the “recursive” byte isn’t 1.
2020-05-29Remove addToStore variant as requested by `FIXME`John Ericson
The idea is it's always more flexible to consumer a `Source` than a plain string, and it might even reduce memory consumption. I also looked at `addToStoreFromDump` with its `// FIXME: remove?`, but the worked needed for that is far more up for interpretation, so I punted for now.
2020-05-27Rename some variables named “recursive” to “method”Matthew Bauer
This is much less confusing since recursive is no longer a boolean.
2020-05-26Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethodCarlo Nucera
2020-05-18CleanupEelco Dolstra
2020-05-18Merge branch 'wait-for-builders' of https://github.com/serokell/nixEelco Dolstra
2020-05-14Don't lock a user while doing remote buildsAlexander Bantyev
2020-05-12Show hint how to enable experimental featuresEelco Dolstra
2020-05-11Merge pull request #3568 from kolloch/outputHashModeErrorDomen Kožar
libstore/build.cc: more explicit error about form of output
2020-05-11Update src/libstore/build.ccDomen Kožar
2020-05-09doc: consistently refer to 'fixed-output' with a dashBenjamin Hipple
General cleanup that makes it easier to search for the term.
2020-05-08Mention build users in the 'waiting for' messageAlexander Bantyev
2020-05-08Don't block while waiting for build usersAlexander Bantyev
2020-05-06Merge pull request #3546 from guibou/nix_readfile_on_0_sized_filesEelco Dolstra
builtins.readFile: do not truncate content
2020-05-06libstore/build.cc: more explicit about form of outputPeter Kolloch
Be more explicit about why we expect a regular file as output when outputHashMode=flat for a fixed output derivation.
2020-05-06Merge pull request #3562 from pikajude/masterEelco Dolstra
Use fragment size for autoGC capacity calculation
2020-05-06Revert "Merge pull request #3558 from LnL7/ssh-ng-stderr"Eelco Dolstra
This reverts commit 3ebfbecdd187002569257f7cb183bf9e0b39af1e, reversing changes made to c089c52d5f1cff888552f485775b74226dcbe618. https://github.com/NixOS/nix/pull/3558
2020-05-05Wait for build users when none are availableAlexander Bantyev
2020-05-04nix auto-gc: use fragment sizeJude Taylor
2020-05-04Flag: Use designated initializersEelco Dolstra
2020-05-02remote-store: don't log raw stderr by defaultDaiderd Jordan
For remote stores the log messages are already forwarded as structured STDERR_RESULT messages so the old format is duplicate information. But still included with -vvv since it could be useful for debugging problems. $ nix build -L /nix/store/nl71b2niws857ffiaggyrkjwgx9jjzc0-foo.drv --store ssh-ng://localhost Hello World! foo> Hello World! [1/0/1 built] building foo Fixes #3556
2020-04-29Remove the `drain` argument from `readFile`Guillaume Bouchard
Now it is always `drain` (see previous commit).
2020-04-29Only call grantpt on MacOS systemsAntoine Eiche
The commit 3cc1125595d97b4ab7369e37e4ad22f4cfecb8b2 adds a `grantpt` call on the builder pseudo terminal fd. This call is actually only required for MacOS, but it however requires a RW access to /dev/pts which is only RO bindmounted in the Bazel Linux sandbox. So, Nix can not be actually run in the Bazel Linux sandbox for unneeded reasons.
2020-04-21Replace select() with poll() to allow waiting on more than FD_SETSIZE fdsDustin DeWeese
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-10Fix nix-build --check -K in sandbox w/o rootBruce Toll
Temporarily add user-write permission to build directory so that it can be moved out of the sandbox to the store with a .check suffix. This is necessary because the build directory has already had its permissions set read-only, but write permission is required to update the directory's parent link to move it out of the sandbox. Updated the related --check "derivation may not be deterministic" messages to consistently use the real store paths. Added test for non-root sandbox nix-build --check -K to demonstrate issue and help prevent regressions.
2020-04-10Merge pull request #2689 from tollb/fix/delete_tmp_dir_when_build_check_okDomen Kožar
Delete temporary directory on successful build
2020-04-09Delete temporary directory on successful buildBruce Toll
With --check and the --keep-failed (-K) flag, the temporary directory was being retained regardless of whether the build was successful and reproducible. This removes the temporary directory, as expected, on a reproducible check build. Added tests to verify that temporary build directories are not retained unnecessarily, particularly when using --check with --keep-failed.
2020-04-09gc.cc: Ignore hidden files in temprootsPhilipp Middendorf
2020-04-08datatransfer.{cc,hh} -> filetransfer.{cc,hh}Nikola Knezevic
2020-04-08DataTransfer -> FileTransferNikola Knezevic
2020-04-08Add upload methodNikola Knezevic
2020-04-08actDownload -> actDataTransferNikola Knezevic
2020-04-08DownloadError -> DataTransferErrorNikola Knezevic
2020-04-08DownloadItem -> TransferItemNikola Knezevic
2020-04-08{get,make,new}Downloader -> DataTransferNikola Knezevic
2020-04-08enqueueDownload -> enqueueDataTransferNikola Knezevic
2020-04-08DownloadResult -> DataTransferResultNikola Knezevic
2020-04-08DownloadSettings -> DataTransferSettingsNikola Knezevic
2020-04-08Rename src/lib/download.* to src/lib/datatransfer.*Nikola Knezevic
2020-04-08DownloadRequest -> DataTransferRequestNikola Knezevic
2020-04-08build.cc: improve message if home directory existsDomen Kožar
2020-04-08Downloader: Only write data to the sink on a 200 responseEelco Dolstra
Hopefully fixes #3278.
2020-04-07CleanupEelco Dolstra
2020-04-07Backport libfetchers from the flakes branchEelco Dolstra
This provides a pluggable mechanism for defining new fetchers. It adds a builtin function 'fetchTree' that generalizes existing fetchers like 'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a set of attributes, e.g. fetchTree { type = "git"; url = "https://example.org/repo.git"; ref = "some-branch"; rev = "abcdef..."; } The existing fetchers are just wrappers around this. Note that the input attributes to fetchTree are the same as flake input specifications and flake lock file entries. All fetchers share a common cache stored in ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}). This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
2020-04-05Don't retry on "unsupported protocol" errorCole Helbling
When encountering an unsupported protocol, there's no need to retry. Chances are, it won't suddenly be supported between retry attempts; error instead. Otherwise, you see something like the following: $ nix-env -i -f git://git@github.com/foo/bar warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 335 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 604 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 1340 ms warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 2685 ms With this change, you now see: $ nix-env -i -f git://git@github.com/foo/bar error: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1)
2020-03-31fix placeholder not substituted in passAsFilemlatus
2020-03-30Never cast `FileIngestionMethod` to or from booleanJohn Ericson