diff options
Diffstat (limited to 'nix/libstore')
| -rw-r--r-- | nix/libstore/build.cc | 3 | ||||
| -rw-r--r-- | nix/libstore/derivations.cc | 3 | ||||
| -rw-r--r-- | nix/libstore/derivations.hh | 2 | ||||
| -rw-r--r-- | nix/libstore/globals.cc | 6 | ||||
| -rw-r--r-- | nix/libstore/globals.hh | 4 | ||||
| -rw-r--r-- | nix/libstore/local-store.hh | 6 | ||||
| -rw-r--r-- | nix/libstore/optimise-store.cc | 3 | ||||
| -rw-r--r-- | nix/libstore/store-api.cc | 13 | ||||
| -rw-r--r-- | nix/libstore/store-api.hh | 2 |
9 files changed, 8 insertions, 34 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index 9010ca4e200..935f7aacf83 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc | |||
| @@ -3367,9 +3367,6 @@ void DerivationGoal::registerOutputs() | |||
| 3367 | } | 3367 | } |
| 3368 | 3368 | ||
| 3369 | 3369 | ||
| 3370 | string drvsLogDir = "drvs"; | ||
| 3371 | |||
| 3372 | |||
| 3373 | Path DerivationGoal::openLogFile() | 3370 | Path DerivationGoal::openLogFile() |
| 3374 | { | 3371 | { |
| 3375 | logSize = 0; | 3372 | logSize = 0; |
diff --git a/nix/libstore/derivations.cc b/nix/libstore/derivations.cc index f05296702b3..b6203b1e385 100644 --- a/nix/libstore/derivations.cc +++ b/nix/libstore/derivations.cc | |||
| @@ -211,9 +211,6 @@ bool isFixedOutputDrv(const Derivation & drv) | |||
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | 213 | ||
| 214 | DrvHashes drvHashes; | ||
| 215 | |||
| 216 | |||
| 217 | /* Returns the hash of a derivation modulo fixed-output | 214 | /* Returns the hash of a derivation modulo fixed-output |
| 218 | subderivations. A fixed-output derivation is a derivation with one | 215 | subderivations. A fixed-output derivation is a derivation with one |
| 219 | output (`out') for which an expected hash and hash algorithm are | 216 | output (`out') for which an expected hash and hash algorithm are |
diff --git a/nix/libstore/derivations.hh b/nix/libstore/derivations.hh index 8d5e4d05d46..0fbab3a7a4a 100644 --- a/nix/libstore/derivations.hh +++ b/nix/libstore/derivations.hh | |||
| @@ -77,7 +77,7 @@ Hash hashDerivationModulo(StoreAPI & store, Derivation drv); | |||
| 77 | /* Memoisation of hashDerivationModulo(). */ | 77 | /* Memoisation of hashDerivationModulo(). */ |
| 78 | typedef std::map<Path, Hash> DrvHashes; | 78 | typedef std::map<Path, Hash> DrvHashes; |
| 79 | 79 | ||
| 80 | extern DrvHashes drvHashes; | 80 | inline DrvHashes drvHashes; |
| 81 | 81 | ||
| 82 | /* Split a string specifying a derivation and a set of outputs | 82 | /* Split a string specifying a derivation and a set of outputs |
| 83 | (/nix/store/hash-foo!out1,out2,...) into the derivation path and | 83 | (/nix/store/hash-foo!out1,out2,...) into the derivation path and |
diff --git a/nix/libstore/globals.cc b/nix/libstore/globals.cc index 8551fea56c0..885ba4eafc1 100644 --- a/nix/libstore/globals.cc +++ b/nix/libstore/globals.cc | |||
| @@ -17,9 +17,6 @@ namespace nix { | |||
| 17 | #define DEFAULT_SOCKET_PATH "/daemon-socket/socket" | 17 | #define DEFAULT_SOCKET_PATH "/daemon-socket/socket" |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | Settings settings; | ||
| 21 | |||
| 22 | |||
| 23 | Settings::Settings() | 20 | Settings::Settings() |
| 24 | { | 21 | { |
| 25 | keepFailed = false; | 22 | keepFailed = false; |
| @@ -205,7 +202,4 @@ Settings::SettingsMap Settings::getOverrides() | |||
| 205 | } | 202 | } |
| 206 | 203 | ||
| 207 | 204 | ||
| 208 | const string nixVersion = PACKAGE_VERSION; | ||
| 209 | |||
| 210 | |||
| 211 | } | 205 | } |
diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh index 7cfa06e76c1..c2824789ede 100644 --- a/nix/libstore/globals.hh +++ b/nix/libstore/globals.hh | |||
| @@ -227,10 +227,10 @@ private: | |||
| 227 | 227 | ||
| 228 | 228 | ||
| 229 | // FIXME: don't use a global variable. | 229 | // FIXME: don't use a global variable. |
| 230 | extern Settings settings; | 230 | inline Settings settings; |
| 231 | 231 | ||
| 232 | 232 | ||
| 233 | extern const string nixVersion; | 233 | inline const string nixVersion {PACKAGE_VERSION}; |
| 234 | 234 | ||
| 235 | 235 | ||
| 236 | } | 236 | } |
diff --git a/nix/libstore/local-store.hh b/nix/libstore/local-store.hh index 20d3c3c8930..4d529b37a44 100644 --- a/nix/libstore/local-store.hh +++ b/nix/libstore/local-store.hh | |||
| @@ -19,7 +19,7 @@ namespace nix { | |||
| 19 | const int nixSchemaVersion = 7; | 19 | const int nixSchemaVersion = 7; |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | extern string drvsLogDir; | 22 | inline std::string drvsLogDir {"drvs"}; |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | struct Derivation; | 25 | struct Derivation; |
| @@ -293,6 +293,8 @@ void canonicaliseTimestampAndPermissions(const Path & path); | |||
| 293 | MakeError(PathInUse, Error); | 293 | MakeError(PathInUse, Error); |
| 294 | 294 | ||
| 295 | /* Size below which a file is not considered for deduplication. */ | 295 | /* Size below which a file is not considered for deduplication. */ |
| 296 | extern const size_t deduplicationMinSize; | 296 | /* Any file smaller than this is not considered for deduplication. |
| 297 | Keep in sync with (guix store deduplication). */ | ||
| 298 | inline const size_t deduplicationMinSize {8192}; | ||
| 297 | 299 | ||
| 298 | } | 300 | } |
diff --git a/nix/libstore/optimise-store.cc b/nix/libstore/optimise-store.cc index d69c43e9978..54aa166c344 100644 --- a/nix/libstore/optimise-store.cc +++ b/nix/libstore/optimise-store.cc | |||
| @@ -16,9 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | namespace nix { | 17 | namespace nix { |
| 18 | 18 | ||
| 19 | /* Any file smaller than this is not considered for deduplication. | ||
| 20 | Keep in sync with (guix store deduplication). */ | ||
| 21 | const size_t deduplicationMinSize = 8192; | ||
| 22 | 19 | ||
| 23 | static void makeWritable(const Path & path) | 20 | static void makeWritable(const Path & path) |
| 24 | { | 21 | { |
diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 1067e44a8e2..26d44f78b19 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc | |||
| @@ -253,16 +253,3 @@ template<class T> T readStorePaths(Source & from) | |||
| 253 | template PathSet readStorePaths(Source & from); | 253 | template PathSet readStorePaths(Source & from); |
| 254 | 254 | ||
| 255 | } | 255 | } |
| 256 | |||
| 257 | |||
| 258 | #include "local-store.hh" | ||
| 259 | #include "serialise.hh" | ||
| 260 | |||
| 261 | |||
| 262 | namespace nix { | ||
| 263 | |||
| 264 | |||
| 265 | std::shared_ptr<StoreAPI> store; | ||
| 266 | |||
| 267 | |||
| 268 | } | ||
diff --git a/nix/libstore/store-api.hh b/nix/libstore/store-api.hh index 32a8f2c795f..affa98b179d 100644 --- a/nix/libstore/store-api.hh +++ b/nix/libstore/store-api.hh | |||
| @@ -363,7 +363,7 @@ Paths topoSortPaths(StoreAPI & store, const PathSet & paths); | |||
| 363 | 363 | ||
| 364 | /* For now, there is a single global store API object, but we'll | 364 | /* For now, there is a single global store API object, but we'll |
| 365 | purify that in the future. */ | 365 | purify that in the future. */ |
| 366 | extern std::shared_ptr<StoreAPI> store; | 366 | inline std::shared_ptr<StoreAPI> store; |
| 367 | 367 | ||
| 368 | 368 | ||
| 369 | /* Display a set of paths in human-readable form (i.e., between quotes | 369 | /* Display a set of paths in human-readable form (i.e., between quotes |
