aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-02-12Merge pull request #2628 from shlevy/context-introspectionEelco Dolstra
Context introspection
2019-02-05Revert "Restore parent mount namespace before executing a child process"Eelco Dolstra
This reverts commit a0ef21262f4d5652bfb65cfacaec01d89c475a93. This doesn't work in 'nix run' and nix-shell because setns() fails in multithreaded programs, and Boehm GC mark threads are uncancellable. Fixes #2646.
2019-01-31Add builtins.appendContext.Shea Levy
A partner of builtins.getContext, useful for the same reasons.
2019-01-23nix-store: make --dump-db take a list of paths to dumpSpencer Baugh
Inside a derivation, exportReferencesGraph already provides a way to dump the Nix database for a specific closure. On the command line, --dump-db gave us the same information, but only for the entire Nix database at once. With this change, one can now pass a list of paths to --dump-db to get the Nix database dumped for just those paths. (The user is responsible for ensuring this is a closure, like for --export). Among other things, this is useful for deploying a closure to a new host without using --import/--export; one can use tar to transfer the store paths, and --dump-db/--load-db to transfer the validity information. This is useful if the new host doesn't actually have Nix yet, and the closure that is being deployed itself contains Nix.
2019-01-18unsupported(): Show the name of the unsupported operationEelco Dolstra
2019-01-14Add builtins.getContext.Shea Levy
This can be very helpful when debugging, as well as enabling complex black magic like surgically removing a single dependency from a string's context.
2019-01-13Treat plain derivation paths in context as normal paths.Shea Levy
Previously, plain derivation paths in the string context (e.g. those that arose from builtins.storePath on a drv file, not those that arose from accessing .drvPath of a derivation) were treated somewhat like derivaiton paths derived from .drvPath, except their dependencies weren't recursively added to the input set. With this change, such plain derivation paths are simply treated as paths and added to the source inputs set accordingly, simplifying context handling code and removing the inconsistency. If drvPath-like behavior is desired, the .drv file can be imported and then .drvPath can be accessed. This is a backwards-incompatibility, but storePath is never used on drv files within nixpkgs and almost never used elsewhere.
2019-01-10Merge pull request #2608 from dtzWill/fix/issue-2546Eelco Dolstra
EvalState::resetFileCache: clear parse cache as well as eval cache
2019-01-10Merge pull request #2617 from veprbl/pr/V547_nix_repl.ccEelco Dolstra
remove some dead code in nix/repl.cc
2019-01-07Merge pull request #2601 from dtzWill/update/json-3.5.0Eelco Dolstra
Update nlohmann-json 3.0.1 -> 3.5.0
2019-01-05Remove mentions of `libformat`, it no longer existsJohn Ericson
2019-01-05brotli is only used as a library nowJohn Ericson
2018-12-31EvalState::resetFileCache: clear parse cache as well as eval cacheWill Dietz
Fixes #2546. (at least the basic reproduction I've been testing)
2018-12-25remove some dead code in nix/repl.ccDmitry Kalinkin
Fixes a static analyzer warning: Expression 'isDrv' is always false. Fixes: 3beb6f6e7 ('Show derivations more concisely')
2018-12-21nlohmann-json: 3.4.0 -> 3.5.0Will Dietz
https://github.com/nlohmann/json/releases/tag/v3.5.0
2018-12-21nlohmann: 3.0.1 -> 3.4.0Will Dietz
``` $ curl -L "https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp" -o src/nlohmann/json.hpp ```
2018-12-15nix-store: remove debugging printWill Dietz
2018-12-13Support SRI hashesEelco Dolstra
SRI hashes (https://www.w3.org/TR/SRI/) combine the hash algorithm and a base-64 hash. This allows more concise and standard hash specifications. For example, instead of import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; sha256 = "5d22dad058d5c800d65a115f919da22938c50dd6ba98c5e3a183172d149840a4"; }; you can write import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; hash = "sha256-XSLa0FjVyADWWhFfkZ2iKTjFDda6mMXjoYMXLRSYQKQ="; }; In fixed-output derivations, the outputHashAlgo is no longer mandatory if outputHash specifies the hash (either as an SRI or in the old "<type>:<hash>" format). 'nix hash-{file,path}' now print hashes in SRI format by default. I also reverted them to use SHA-256 by default because that's what we're using most of the time in Nixpkgs. Suggested by @zimbatm.
2018-12-13Merge pull request #2576 from LnL7/repl-no-linkEelco Dolstra
nix repl: don't create result symlinks
2018-12-13probably typovolth
...at least MSVC unable to compile this
2018-12-12nix repl: don't create result symlinksDaiderd Jordan
2018-12-12libstore: improve hash mismatch error messageszimbatm
Use the same output ordering and format everywhere. This is such a common issue that we trade the single-line error message for more readability. Old message: ``` fixed-output derivation produced path '/nix/store/d4nw9x2sy9q3r32f3g5l5h1k833c01vq-example.com' with sha256 hash '08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm' instead of the expected hash '1xzwnipjd54wl8g93vpw6hxnpmdabq0wqywriiwmh7x8k0lvpq5m' ``` New message: ``` hash mismatch in fixed-output derivation '/nix/store/d4nw9x2sy9q3r32f3g5l5h1k833c01vq-example.com': wanted: sha256:1xzwnipjd54wl8g93vpw6hxnpmdabq0wqywriiwmh7x8k0lvpq5m got: sha256:08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm ```
2018-12-12Fix assertion failure in NarInfoDiskCacheEelco Dolstra
https://hydra.nixos.org/build/85827920
2018-12-12nar-info-disk-cache: include ca in the cache entriesDaiderd Jordan
Without this information the content addressable state and hashes are lost after the first request, this causes signatures to be required for everything even tho the path could be verified without signing.
2018-12-07s3: make scheme configurableDaiderd Jordan
This enables using for http for S3 request for debugging or implementations that don't have https configured. This is not a problem for binary caches since they should not contain sensitive information. Both package signatures and AWS auth already protect against tampering.
2018-12-06Solve hg "abandoned transaction" issueCHEIKH Chawki
2018-11-20fetchGit: Drop unnecessary localRefEelco Dolstra
2018-11-20Merge branch 'better-git-cache' of https://github.com/graham-at-target/nixEelco Dolstra
2018-11-20Merge pull request #2216 from dtzWill/fix/curl-760-timeoutEelco Dolstra
download: if there are active requests, never sleep for 10s
2018-11-20Fix typoEelco Dolstra
2018-11-20repl: give user the choice between libeditline and libreadlineKai Harries
The goal is to support libeditline AND libreadline and let the user decide at compile time which one to use. Add a compile time option to use libreadline instead of libeditline. If compiled against libreadline completion functionality is lost because of a incompatibility between libeditlines and libreadlines completion function. Completion with libreadline is possible and can be added later. To use libreadline instead of libeditline the environment variables 'EDITLINE_LIBS' and 'EDITLINE_CFLAGS' have to been set during the ./configure step. Example: EDITLINE_LIBS="/usr/lib/x86_64-linux-gnu/libhistory.so /usr/lib/x86_64-linux-gnu/libreadline.so" EDITLINE_CFLAGS="-DREADLINE" The reason for this change is that for example on Debian already three different editline libraries exist but none of those is compatible the flavor used by nix. My hope is that with this change it would be easier to port nix to systems that have already libreadline available.
2018-11-20repl: Remove code that was commented outKai Harries
2018-11-16nix ls-nar: allow reading from FIFOsLinus Heckemann
fixes #2528
2018-11-15Fix 'Read-only file system' when building a derivationEelco Dolstra
2018-11-13Merge branch 'feature/editline-pr' of https://github.com/dtzWill/nixEelco Dolstra
2018-11-13Restore parent mount namespace before executing a child processEelco Dolstra
This ensures that they can't write to /nix/store. Fixes #2535.
2018-11-09nix-prefetch-url: Stop progress bar before printing resultsEelco Dolstra
2018-11-09Merge branch 'feature/prefetch-progress' of https://github.com/dtzWill/nixEelco Dolstra
2018-11-07Enable sandboxing by defaultEelco Dolstra
Closes #179.
2018-11-01Disable the S3 content-encoding patchEelco Dolstra
Since we're not using multi-part uploads at the moment, we can drop this patch.
2018-10-31Fix typo in commentsJan Path
2018-10-31Merge pull request #2501 from mayflower/xdg_config_dirsEelco Dolstra
config: use all of XDG_CONFIG_DIRS
2018-10-31config: use all of XDG_CONFIG_DIRSLinus Heckemann
Previously, config would only be read from XDG_CONFIG_HOME. This change allows reading config from additional directories, which enables e.g. per-project binary caches or chroot stores with the help of direnv.
2018-10-30Remove redundant messageEelco Dolstra
2018-10-30S3BinaryCacheStore: Allow disabling multipart uploadsEelco Dolstra
The use of TransferManager has several issues, including that it doesn't allow setting a Content-Encoding without a patch, and it doesn't handle exceptions in worker threads (causing termination on memory allocation failure). Fixes #2493.
2018-10-30Fix broken uploadProgressCallback closureEelco Dolstra
Since the callback is global we can't refer to 'path' in it. This could cause a segfault or printing of arbitrary data.
2018-10-29Merge pull request #2494 from FPtje/fix-copy-from-oldEelco Dolstra
copyStorePath: Fix hash errors when copying from older store
2018-10-29copyStorePath: Fix hash errors when copying from older storeFalco Peijnenburg
This commit partially reverts 48662d151bdf4a38670897beacea9d1bd750376a. When copying from an older store (in my case a store running Nix 1.11.7), nix would throw errors about there being no hash. This is fixed by recalculating the hash.
2018-10-29repl: complete if all matches share prefixWill Dietz
2018-10-29editline: wipWill Dietz