aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-23Merge branch 'man1' of https://github.com/alyssais/nixEelco Dolstra
2021-04-23doc: fix section in nix3 man page metadataAlyssa Ross
These man pages said they were in section 7, even though we were installing them to section 1 (which is the right place for them).
2021-04-23Merge pull request #4440 from Ma27/misc-pos-fixesEelco Dolstra
Miscellaneous improvements for positioning in eval-errors
2021-04-22Merge branch 'master' of github.com:NixOS/nixEelco Dolstra
2021-04-22Merge branch 'nix-derivation-query-store-path' of ↵Eelco Dolstra
https://github.com/matthewbauer/nix
2021-04-22Merge pull request #4724 from NixOS/nix-shell-missing-outputsEelco Dolstra
Make `nix shell` fallback to static outputs when needed
2021-04-22Remove makeDecompressionSource()Eelco Dolstra
This function doesn't support all compression methods (i.e. 'none' and 'br') so it shouldn't be exposed. Also restore the original decompress() as a wrapper around makeDecompressionSink().
2021-04-22Merge branch 's3-decompress' of https://github.com/lukegb/nixEelco Dolstra
2021-04-22Merge pull request #4729 from alarsyo/fix-flake-doc-typoEelco Dolstra
Fix typo in flake doc
2021-04-22libutil: allow decompression with none/empty methodLuke Granger-Brown
The S3 store relies on the ability to be able to decompress things with an empty method, because it just passes the value of the Content-Encoding directly to decompress. If the file is not compressed, then this will cause the compression routine to get confused. This caused NixOS/nixpkgs#120120.
2021-04-22Fix typo in flake docAntoine Martin
2021-04-21Get deriver when passing --derivationMatthew Bauer
This makes Nix look up paths derivations when they are passed as a store paths. So: $ nix path-info --derivation /nix/store/0pisd259nldh8yfjvw663mspm60cn5v8-hello-2.10 now gives /nix/store/qp724w90516n4bk5r9gfb37vzmqdh3z7-hello-2.10.drv instead of "". If no deriver is available, Nix now errors instead of silently ignoring that argument.
2021-04-21Make `nix shell` fallback to static outputs when neededregnat
In case of pure input-addressed derivations, the build loop doesn't guaranty that the realisations are stored in the db (if the output paths are already there or can be substituted, the realisations won't be registered). This caused `nix shell` to fail in some cases because it was assuming that the realisations were always existing. A better (but more involved) fix would probably to ensure that we always register the realisations, but in the meantime this patches the surface issue. Fix #4721
2021-04-20Fix brotli compression of files > 128 KiBEelco Dolstra
This has been broken since faa31f40846f7a4dbc2487d000b112a6aef69d1b.
2021-04-20Merge pull request #4720 from alyssais/waitEelco Dolstra
Include sys/wait.h everywhere WIFEXITED etc is used
2021-04-19Merge pull request #4688 from Ma27/force-reevaluationEelco Dolstra
libcmd/installables: force re-evaluation of cached failures
2021-04-19Include sys/wait.h everywhere WIFEXITED etc is usedAlyssa Ross
This is required on NetBSD, and I think FreeBSD too.
2021-04-19libcmd/installables: force re-evaluation of cached failuresMaximilian Bosch
I think that it's not very helpful to get "cached failures" in a wrong `flake.nix`. This can be very confusing when debugging a Nix expression. See for instance NixOS/nixpkgs#118115. In fact, the eval cache allows a forced reevaluation which is used for e.g. `nix eval`. This change makes sure that this is the case for `nix build` as well. So rather than λ ma27 [~/Projects/exp] → ../nix/outputs/out/bin/nix build -L --rebuild --experimental-features 'nix-command flakes' error: cached failure of attribute 'defaultPackage.x86_64-linux' the evaluation of already-evaluated (and failed) attributes looks like this now: λ ma27 [~/Projects/exp] → ../nix/outputs/out/bin/nix build -L --rebuild --experimental-features 'nix-command flakes' error: attribute 'hell' missing at /nix/store/mrnvi9ss8zn5wj6gpn4bcd68vbh42mfh-source/flake.nix:6:35: 5| 6| packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hell; | ^ 7| (use '--show-trace' to show detailed location information)
2021-04-15Merge branch 'build-with-strictDeps' of https://github.com/hercules-ci/nixEelco Dolstra
2021-04-15Merge pull request #4679 from ony/feature/one-pass-canon-pathEelco Dolstra
Optimize canonPath to resolve relative symlinks in one pass
2021-04-15Drop unused tar dependencyEelco Dolstra
2021-04-15Drop libbz2 / zlib / lzma dependency + style fixesEelco Dolstra
2021-04-15Merge branch 'libarchive-decompress' of https://github.com/serokell/nixEelco Dolstra
2021-04-15Merge branch 'revertRemoveJSON' of https://github.com/cgohla/nixEelco Dolstra
2021-04-14Merge pull request #4707 from grahamc/defaul-path-restricted-evalEelco Dolstra
EvalSettings::getDefaultNixPath: respect {restrict,pure}Eval
2021-04-14Merge pull request #4708 from NixOS/fix-remote-registerDrvOutputEelco Dolstra
Fix registerDrvOutput with the daemon
2021-04-13libexpr/primops: reviewMaximilian Bosch
2021-04-13primops/libexpr: use new attr-call extractor everywhere; use function's pos ↵Maximilian Bosch
if attr-set pos == noPos
2021-04-13libexpr/primops: Move attr name extraction into its own functionMaximilian Bosch
This now takes care of providing positioning for both the faulting value and the faulting function call in case of an error.
2021-04-13libexpr: misc improvements for proper error positionMaximilian Bosch
When working on some more complex Nix code, there are sometimes rather unhelpful or misleading error messages, especially if coerce-errors are thrown. This patch is a first steps towards improving that. I'm happy to file more changes after that, but I'd like to gather some feedback first. To summarize, this patch does the following things: * Attrsets (a.k.a. `Bindings` in `libexpr`) now have a `Pos`. This is helpful e.g. to identify which attribute-set in `listToAttrs` is invalid. * The `Value`-struct has a new method named `determinePos` which tries to guess the position of a value and falls back to a default if that's not possible. This can be used to provide better messages if a coercion fails. * The new `determinePos`-API is used by `builtins.concatMap` now. With that change, Nix shows the exact position in the error where a wrong value was returned by the lambda. To make sure it's still obvious that `concatMap` is the problem, another stack-frame was added. * The changes described above can be added to every other `primop`, but first I'd like to get some feedback about the overall approach.
2021-04-13primops/derivation: use position of currently evaluated attributeMaximilian Bosch
* The position of the `name`-attribute appears in the trace. * If e.g. `meta` has no `outPath`-attribute, a `cannot coerce set to string` error will be thrown where `pos` points to `name =` which is highly misleading.
2021-04-13Merge pull request #4 from domenkozar/libcompress-testsYorick
add tests for zstd compression
2021-04-13Fix registerDrvOutput with the daemonregnat
Resolve a protocol issue that caused the daemon to endlessly wait for some information that the client doesn't ever send
2021-04-12EvalSettings::getDefaultNixPath: respect {restrict,pure}EvalGraham Christensen
Otherwise Nix may look to invalid locations for channels.
2021-04-12Merge pull request #4706 from ↵Domen Kožar
NixOS/dependabot/github_actions/cachix/cachix-action-v10 Bump cachix/cachix-action from v9 to v10
2021-04-12Bump cachix/cachix-action from v9 to v10dependabot[bot]
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from v9 to v10. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v9...73e75d1a0cd4330597a571e8f9dedb41faa2fc4e) Signed-off-by: dependabot[bot] <support@github.com>
2021-04-09add tests for zstd compressionDomen Kožar
2021-04-09Revert "libfetchers/tarball: Lock on effectiveUrl"Eelco Dolstra
This reverts commit fc6bfb261d50102016ed812ecf9949d41fe539f7. Fixes #4672.
2021-04-07Restore stack size in child processesEelco Dolstra
Fixes #4673.
2021-04-07restoreSignals() + restoreAffinity() -> restoreProcessContext()Eelco Dolstra
2021-04-07PathSubstitutionGoal: Clean up pipeEelco Dolstra
If there were many top-level goals (which are not destroyed until the very end), commands like $ nix copy --to 'ssh://localhost?remote-store=/tmp/nix' \ /run/current-system --no-check-sigs --substitute-on-destination could fail with "Too many open files". So now we do some explicit cleanup from amDone(). It would be cleaner to separate goals from their temporary internal state, but that would be a bigger refactor.
2021-04-05Revert "[prerequisites]: add JSON lib dependency"Björn Gohla
This reverts commit 5926200db09ca4d0c5769edf24a3cf2e9f472d23.
2021-04-05Revert "Use upstream nlohmann_json"Björn Gohla
This reverts commit 4145cd2da002e1bd8affa0392c80118eabe58e3c.
2021-04-05Merge pull request #4594 from obsidiansystems/lots-of-buildableEelco Dolstra
Use `DerivedPath` for `buildPaths` and `ensurePath`
2021-04-05Document the derived path types.John Ericson
2021-04-05buildable.{cc,hh} -> derived-path.{cc,hh}John Ericson
2021-04-05Make `DerivedPathWithHints` a newtypeJohn Ericson
This allows us to namespace its constructors under it.
2021-04-05Rename BuildableJohn Ericson
2021-04-05"newtype" BuildableReqJohn Ericson
This makes for better types errors and allows us to give it methods.
2021-04-05No templates for `Buildable` and `BuildableReq`John Ericson