aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-08-28nix develop: Set output paths to writable locationsEelco Dolstra
Currently, they're set to $(pwd)/outputs/$outputName. This allows commands like 'make install' to work.
2020-08-28Merge branch 'minimal-logger' of https://github.com/Ma27/nixEelco Dolstra
2020-08-27Pass all args when auto-calling a function with an ellipsisGriffin Smith
The command line options --arg and --argstr that are used by a bunch of CLI commands to pass arguments to top-level functions in files go through the same code-path as auto-calling top-level functions with their default arguments - this, however, was only passing the arguments that were *explicitly* mentioned in the formals of the function - in the case of an as-pattern with an ellipsis (eg args @ { ... }) extra passed arguments would get omitted. This fixes that to instead pass *all* specified auto args in the case that our function has an ellipsis. Fixes #598
2020-08-27Merge pull request #3434 from Ericson2314/derivation-header-include-orderEelco Dolstra
Revise division of labor in deserialization of derivations
2020-08-27TypoEelco Dolstra
2020-08-27RemoteStore::addToStore(): Fix race between stderrThread and NAR writerEelco Dolstra
As pointed out by @B4dM4n, the call to to.flush() on stderrThread is unsafe because the NAR writer thread is also writing to 'to'. Fixes #3943.
2020-08-24Merge pull request #3950 from obsidiansystems/tabs-spacesEelco Dolstra
tabs -> spaces
2020-08-23`writeDerivation` just needs a plain store referenceJohn Ericson
2020-08-21tabs -> spacesJohn Ericson
Sorry I let the tab sneak in there in the first place.
2020-08-20Merge pull request #3859 from obsidiansystems/drv-outputs-map-allow-missingEelco Dolstra
`queryDerivationOutputMap` no longer assumes all outputs have a mapping
2020-08-20Rename drv output querying functionsJohn Ericson
- `queryDerivationOutputMapAssumeTotal` -> `queryPartialDerivationOutputMap` - `queryDerivationOutputMapAssumeTotal` -> `queryDerivationOutputMap`
2020-08-19fix spellingRyan Mulligan
2020-08-18Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-08-18Merge pull request #3917 from obsidiansystems/output-env-var-unconditionalEelco Dolstra
Simplify code as output env vars are unconditional
2020-08-18Merge pull request #3930 from obsidiansystems/legacy-ssh-build-pathsEelco Dolstra
Define `LegacySSHStore::buildPaths` using `cmdBuildPaths`
2020-08-17Merge pull request #3932 from chkno/no-show-signatureEelco Dolstra
Don't try to parse signature check as commit timestamp
2020-08-17Merge branch 'ca-no-need-trust' of https://github.com/obsidiansystems/nixEelco Dolstra
2020-08-17Merge branch 'test-RemoteStore-buildDerivation' of ↵Eelco Dolstra
https://github.com/obsidiansystems/nix
2020-08-14Remove extra closing parenJohn Ericson
2020-08-14Update src/libstore/daemon.ccJohn Ericson
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2020-08-14Merge pull request #3875 from obsidiansystems/new-interface-for-path-pathOptEelco Dolstra
Offer a safer interface for path and pathOpt
2020-08-14Merge pull request #3924 from obsidiansystems/features-per-storeEelco Dolstra
Make `system-features` a store setting
2020-08-14Merge pull request #3909 from matthewbauer/readd-hashed-mirrorsEelco Dolstra
Add hashed-mirrors back
2020-08-14Merge pull request #3899 from obsidiansystems/make-narHash-not-optionalEelco Dolstra
Make narHash in ValidPathInfo not optional
2020-08-13Don't try to parse signature check as commit timestampChuck
When the log.showSignature git setting is enabled, the output of "git log" contains signature verification information in addition to the timestamp GitInputScheme::fetch wants: $ git log -1 --format=%ct gpg: Signature made Sat 07 Sep 2019 02:02:03 PM PDT gpg: using RSA key 0123456789ABCDEF0123456789ABCDEF01234567 gpg: issuer "user@example.com" gpg: Good signature from "User <user@example.com>" [ultimate] 1567890123 1567890123 For folks that had log.showSignature set, this caused all nix operations on flakes to fail: $ nix build error: stoull
2020-08-13Define `LegacySSHStore::buildPaths` using `cmdBuildPaths`John Ericson
Evidentally this was never implemented because Nix switched to using `buildDerivation` exclusively before `build-remote.pl` was rewritten. The `nix-copy-ssh` test (already) tests this.
2020-08-13Allow trustless building of CA derivationsJohn Ericson
Include a long comment explaining the policy. Perhaps this can be moved to the manual at some point in the future. Also bump the daemon protocol minor version, so clients can tell whether `wopBuildDerivation` supports trustless CA derivation building. I hope to take advantage of this in a follow-up PR to support trustless remote building with the minimal sending of derivation closures.
2020-08-13Use `TeeSink` and `TeeSouce` in a few more placesJohn Ericson
2020-08-13Test `RemoteStore::buildDerivation`John Ericson
Fix `wopNarFromPath` which needed a `toRealPath`.
2020-08-12Merge branch 'daemon-auth-cleanup' of github.com:obsidiansystems/nix into HEADJohn Ericson
2020-08-12Make `system-features` a store settingJohn Ericson
This seems more correct. It also means one can specify the features a store should support with --store and remote-store=..., which is useful. I use this to clean up the build remotes test.
2020-08-12Separate auth and logic for the daemonJohn Ericson
Before, processConnection wanted to know a user name and user id, and `nix-daemon --stdio`, when it isn't proxying to an underlying daemon, would just assume "root" and 0. But `nix-daemon --stdio` (no proxying) shouldn't make guesses about who holds the other end of its standard streams. Now processConnection takes an "auth hook", so `nix-daemon` can provide the appropriate policy and daemon.cc doesn't need to know or care what it is.
2020-08-11demote remote build message to InfoBen Burdette
2020-08-11Merge pull request #3914 from obsidiansystems/small-drv-serialize-cleanupEelco Dolstra
Two small derivation serialization cleanups
2020-08-11Simplify code as output env vars are unconditionalJohn Ericson
Since the jsonObject unique ptr is reset to flush the string to make `__json`, all these `!jsonObject` conditions will always be true.
2020-08-10Always reset ANSI colors in progress-bar lineMaximilian Bosch
When having a message like `waiting for a machine to build X` and building with `nix build -L`, the log-prefix is always colored yellow[1] on a small terminal-width as everything (including the ANSI color-reset) is stripped away. To work around that problem, this patch explicitly adds an `ANSI_NORMAL` to the end of the line. [1] https://imgur.com/a/FjtJOk3
2020-08-10Deduplicate parsing and reading derivationsJohn Ericson
2020-08-10Remove name parameter from `writeDerivation`John Ericson
The name is now stored with the derivation itself.
2020-08-07Fix .ls file names in binary cachesEelco Dolstra
These are not supposed to include the 'name' part of the store path. This was broken by 759947bf72.
2020-08-07Merge remote-tracking branch 'upstream/master' into ↵John Ericson
drv-outputs-map-allow-missing
2020-08-07Specialize `std::optional<StorePath>` so this is backwards compatibleJohn Ericson
While I am cautious to break parametricity, I think it's OK in this cases---we're not about to try to do some crazy polymorphic protocol anytime soon.
2020-08-07nix build (and others): Force re-evaluation of cached errorsEelco Dolstra
Fixes #3872. This is a bit hacky. Ideally we would automatically re-evaluate the failed attribute iff we need to print the error message (so in commands like 'nix search' we wouldn't re-evaluate because we're suppressing errors).
2020-08-07Make --no-eval-cache a global settingEelco Dolstra
2020-08-06Fix buildMatthew Bauer
2020-08-06Merge remote-tracking branch 'origin/master' into readd-hashed-mirrorsMatthew Bauer
2020-08-06Add hashed-mirrors backMatthew Bauer
Some users have their own hashed-mirrors setup, that is used to mirror things in addition to what’s available on tarballs.nixos.org. Although this should be feasable to do with a Binary Cache, it’s not always easy, since you have to remember what "name" each of the tarballs has. Continuing to support hashed-mirrors is cheap, so it’s best to leave support in Nix. Note that NIX_HASHED_MIRRORS is also supported in Nixpkgs through fetchurl.nix. Note that this excludes tarballs.nixos.org from the default, as in \#3689. All of these are available on cache.nixos.org.
2020-08-06Minimize the usage of `Hash::dummy`John Ericson
2020-08-06Merge remote-tracking branch 'upstream/master' into make-narHash-not-optionalJohn Ericson
2020-08-06Merge pull request #3856 from obsidiansystems/buildable-variantEelco Dolstra
Make `Buildable` a `std::variant`
2020-08-06repl.cc: Check for HAVE_BOEHMGCEelco Dolstra
Fixes #3906.