aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.cc
AgeCommit message (Collapse)Author
2020-11-17CleanupEelco Dolstra
2020-11-05Allow substituting paths when building remotely using `ssh-ng://`Maximilian Bosch
Until now, it was not possible to substitute missing paths from e.g. `https://cache.nixos.org` on a remote server when building on it using the new `ssh-ng` protocol. This is because every store implementation except legacy `ssh://` ignores the substitution flag passed to `Store::queryValidPaths` while the `legacy-ssh-store` substitutes the remote store using `cmdQueryValidPaths` when the remote store is opened with `nix-store --serve`. This patch slightly modifies the daemon protocol to allow passing an integer value suggesting whether to substitute missing paths during `wopQueryValidPaths`. To implement this on the daemon-side, the substitution logic from `nix-store --serve` has been moved into a protected method named `Store::substitutePaths` which gets currently called from `LocalStore::queryValidPaths` and `Store::queryValidPaths` if `maybeSubstitute` is `true`. Fixes #2770
2020-10-29Generalize extra-* settingsEelco Dolstra
This removes the extra-substituters and extra-sandbox-paths settings and instead makes every array setting extensible by setting "extra-<name> = <value>" in the configuration file or passing "--<name> <value>" on the command line.
2020-10-11Split out uds-remote-store.{cc.hh}John Ericson
2020-09-21Move Callback into its own headerEelco Dolstra
This gets rid of the inclusion of <future> in util.hh, cutting compilation time by ~20s (CPU time). Issue #4045.
2020-09-16Merge remote-tracking branch 'upstream/master' into ↵John Ericson
remove-storetype-delegate-regStore
2020-09-16Remove useless exception copyThéophane Hufschmitt
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2020-09-16Properly filter the stores according to their declared uriSchemesregnat
When opening a store, only try the stores whose `uriSchemes()` include the current one
2020-09-16Separate store configs from the implemsregnat
Rework the `Store` hierarchy so that there's now one hierarchy for the store configs and one for the implementations (where each implementation extends the corresponding config). So a class hierarchy like ``` StoreConfig-------->Store | | v v SubStoreConfig----->SubStore | | v v SubSubStoreConfig-->SubSubStore ``` (with virtual inheritance to prevent DDD). The advantage of this architecture is that we can now introspect the configuration of a store without having to instantiate the store itself
2020-09-16fixup! Separate the instantiation and initialisation of the storesregnat
2020-09-16Separate the instantiation and initialisation of the storesregnat
Add a new `init()` method to the `Store` class that is supposed to handle all the effectful initialisation needed to set-up the store. The constructor should remain side-effect free and just initialize the c++ data structure. The goal behind that is that we can create “dummy” instances of each store to query static properties about it (the parameters it accepts for example)
2020-09-16Fix the registration of storesregnat
2020-09-16Make the store plugins more introspectableregnat
Directly register the store classes rather than a function to build an instance of them. This gives the possibility to introspect static members of the class or choose different ways of instantiating them.
2020-09-15Merge remote-tracking branch 'upstream/master' into ↵John Ericson
remove-storetype-delegate-regStore
2020-08-28Merge remote-tracking branch 'upstream/master' into single-ca-drv-buildJohn Ericson
2020-08-27Merge pull request #3434 from Ericson2314/derivation-header-include-orderEelco Dolstra
Revise division of labor in deserialization of derivations
2020-08-20Rename drv output querying functions, like masterJohn Ericson
- `queryDerivationOutputMapAssumeTotal` -> `queryPartialDerivationOutputMap` - `queryDerivationOutputMapAssumeTotal` -> `queryDerivationOutputMap
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-19Merge branch 'master' of github.com:NixOS/nix into ↵John Ericson
remove-storetype-delegate-regStore
2020-08-18Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-08-14Merge remote-tracking branch 'upstream/master' into single-ca-drv-buildJohn Ericson
2020-08-14Merge pull request #3899 from obsidiansystems/make-narHash-not-optionalEelco Dolstra
Make narHash in ValidPathInfo not optional
2020-08-13Use `TeeSink` and `TeeSouce` in a few more placesJohn Ericson
2020-08-07Squashed get CA derivations buildingJohn Ericson
2020-08-06Minimize the usage of `Hash::dummy`John Ericson
2020-08-05Remove Hash::operator bool ()Carlo Nucera
Since the hash is not optional anymore
2020-08-05Merge branch 'master' of github.com:NixOS/nix into make-narHash-not-optionalCarlo Nucera
2020-08-05Remove optionality in ValidPathInfo::narInfoCarlo Nucera
2020-08-05Merge remote-tracking branch 'upstream/master' into ↵John Ericson
drv-outputs-map-allow-missing
2020-08-05Merge remote-tracking branch 'upstream/master' into misc-caJohn Ericson
2020-08-04Organize and format code a bitJohn Ericson
2020-08-04Merge remote-tracking branch 'upstream/master' into ↵John Ericson
drv-outputs-map-allow-missing
2020-08-04Merge remote-tracking branch 'upstream/master' into better-ca-parse-errorsJohn Ericson
2020-08-03`addToStore` in terms of `addToStoreFromDump` is not local-store-specificJohn Ericson
2020-08-01Merge remote-tracking branch 'upstream/master' into ↵John Ericson
derivation-header-include-order
2020-07-31Merge branch 'master' of github.com:NixOS/nix into drv-outputs-map-allow-missingCarlo Nucera
2020-07-30Merge branch 'master' of github.com:NixOS/nix into better-ca-parse-errorsCarlo Nucera
2020-07-30Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-07-29CleanupEelco Dolstra
2020-07-27Merge remote-tracking branch 'upstream/master' into hash-always-has-typeJohn Ericson
2020-07-24`queryDerivationOutputMap` no longer assumes all outputs have a mappingJohn Ericson
This assumption is broken by CA derivations. Making a PR now to do the breaking daemon change as soon as possible (if it is already too late, we can bump protocol intead).
2020-07-23Merge remote-tracking branch 'upstream/master' into better-ca-parse-errorsJohn Ericson
2020-07-21Merge pull request #3736 from ↵Eelco Dolstra
obsidiansystems/allow-relative-paths-in-store-option Allow relative paths in --store option
2020-07-21Change logic for deciding what is a relative path for the local storeJohn Ericson
The was Eelco's prefered logic, and it looks good to me!
2020-07-21Merge remote-tracking branch 'upstream/master' into better-ca-parse-errorsJohn Ericson
2020-07-20Correct bug, thoroughly document addToStoreSlowCarlo Nucera
2020-07-20Apply suggestions from code reviewJohn Ericson
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2020-07-17Remove StoreType abstraction and delegate regStoreCarlo Nucera
to each Store implementation. The generic regStore implementation will only be for the ambiguous shorthands, like "" and "auto". This also could get us close to simplifying the daemon command.
2020-07-17Merge branch 'master' of github.com:NixOS/nix into ↵Carlo Nucera
allow-relative-paths-in-store-option