mirror of
https://github.com/NixOS/nix.git
synced 2025-11-25 11:49:35 +01:00
* `nix --delete' command.
This commit is contained in:
parent
c0cbaef4be
commit
692b562342
6 changed files with 66 additions and 2 deletions
|
|
@ -135,6 +135,18 @@ string fetchURL(string url)
|
|||
#endif
|
||||
|
||||
|
||||
void deleteValue(Hash hash)
|
||||
{
|
||||
string name;
|
||||
if (queryDB(nixDB, dbRefs, hash, name)) {
|
||||
string fn = absValuePath(name);
|
||||
deletePath(fn);
|
||||
delDB(nixDB, dbRefs, hash);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* !!! bad name, "query" implies no side effect => getValuePath() */
|
||||
string queryValuePath(Hash hash)
|
||||
{
|
||||
bool checkedNet = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue