libstore: remove StorePath::random

It was only used for impure derivations, which were finally removed in commit
be07629820. Delete the unused function.

Change-Id: I6a6a696481711f68a8c3ea7eac7978fcf5884cce
This commit is contained in:
Alois Wohlschlager
2025-08-24 19:34:20 +02:00
parent 7b6a85982b
commit 8d55251ebd
2 changed files with 0 additions and 11 deletions
-9
View File
@@ -1,7 +1,5 @@
#include "lix/libstore/store-api.hh"
#include <sodium.h>
namespace nix {
static void checkName(std::string_view path, std::string_view name)
@@ -62,13 +60,6 @@ bool StorePath::isDerivation() const
StorePath StorePath::dummy("ffffffffffffffffffffffffffffffff-x");
StorePath StorePath::random(std::string_view name)
{
Hash hash(HashType::SHA1);
randombytes_buf(hash.hash, hash.hashSize);
return StorePath(hash, name);
}
StorePath Store::parseStorePath(std::string_view path) const
{
auto p = canonPath(std::string(path));
-2
View File
@@ -72,8 +72,6 @@ public:
}
static StorePath dummy;
static StorePath random(std::string_view name);
};
typedef std::set<StorePath> StorePathSet;