mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
Merge remote-tracking branch 'origin/master' into flakes
This commit is contained in:
commit
9a18f544ac
16 changed files with 307 additions and 65 deletions
|
@ -386,6 +386,20 @@ string replaceStrings(const std::string & s,
|
|||
const std::string & from, const std::string & to);
|
||||
|
||||
|
||||
std::string rewriteStrings(const std::string & s, const StringMap & rewrites);
|
||||
|
||||
|
||||
/* If a set contains 'from', remove it and insert 'to'. */
|
||||
template<typename T>
|
||||
void replaceInSet(std::set<T> & set, const T & from, const T & to)
|
||||
{
|
||||
auto i = set.find(from);
|
||||
if (i == set.end()) return;
|
||||
set.erase(i);
|
||||
set.insert(to);
|
||||
}
|
||||
|
||||
|
||||
/* Convert the exit status of a child as returned by wait() into an
|
||||
error string. */
|
||||
string statusToString(int status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue