1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Make sodium a required dependency

This commit is contained in:
Eelco Dolstra 2021-01-06 17:56:53 +01:00
parent 9374c2baea
commit 0df69d96e0
10 changed files with 2 additions and 64 deletions

View file

@ -18,9 +18,7 @@
#include <openssl/crypto.h>
#if HAVE_SODIUM
#include <sodium.h>
#endif
namespace nix {
@ -130,10 +128,8 @@ void initNix()
CRYPTO_set_locking_callback(opensslLockCallback);
#endif
#if HAVE_SODIUM
if (sodium_init() == -1)
throw Error("could not initialise libsodium");
#endif
loadConfFile();
@ -283,9 +279,7 @@ void printVersion(const string & programName)
#if HAVE_BOEHMGC
cfg.push_back("gc");
#endif
#if HAVE_SODIUM
cfg.push_back("signed-caches");
#endif
std::cout << "System type: " << settings.thisSystem << "\n";
std::cout << "Additional system types: " << concatStringsSep(", ", settings.extraPlatforms.get()) << "\n";
std::cout << "Features: " << concatStringsSep(", ", cfg) << "\n";