mirror of
https://github.com/NixOS/nix
synced 2025-07-02 17:41:48 +02:00
* Eliminate all uses of the global variable ‘store’ from libstore.
This should also fix: nix-instantiate: ./../boost/shared_ptr.hpp:254: T* boost::shared_ptr<T>::operator->() const [with T = nix::StoreAPI]: Assertion `px != 0' failed. which was caused by hashDerivationModulo() calling the ‘store’ object (during store upgrades) before openStore() assigned it.
This commit is contained in:
parent
5bcdc7e351
commit
93227ff65c
15 changed files with 95 additions and 89 deletions
|
@ -53,8 +53,12 @@ struct Derivation
|
|||
};
|
||||
|
||||
|
||||
class StoreAPI;
|
||||
|
||||
|
||||
/* Write a derivation to the Nix store, and return its path. */
|
||||
Path writeDerivation(const Derivation & drv, const string & name);
|
||||
Path writeDerivation(StoreAPI & store,
|
||||
const Derivation & drv, const string & name);
|
||||
|
||||
/* Parse a derivation. */
|
||||
Derivation parseDerivation(const string & s);
|
||||
|
@ -69,7 +73,7 @@ bool isDerivation(const string & fileName);
|
|||
/* Return true iff this is a fixed-output derivation. */
|
||||
bool isFixedOutputDrv(const Derivation & drv);
|
||||
|
||||
Hash hashDerivationModulo(Derivation drv);
|
||||
Hash hashDerivationModulo(StoreAPI & store, Derivation drv);
|
||||
|
||||
/* Memoisation of hashDerivationModulo(). */
|
||||
typedef std::map<Path, Hash> DrvHashes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue