1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00

Eliminate the substituter mechanism

Substitution is now simply a Store -> Store copy operation, most
typically from BinaryCacheStore to LocalStore.
This commit is contained in:
Eelco Dolstra 2016-04-29 13:57:08 +02:00
parent 21e9d183cc
commit aa3bc3d5dc
16 changed files with 166 additions and 597 deletions

12
src/libutil/finally.hh Normal file
View file

@ -0,0 +1,12 @@
#pragma once
/* A trivial class to run a function at the end of a scope. */
class Finally
{
private:
std::function<void()> fun;
public:
Finally(std::function<void()> fun) : fun(fun) { }
~Finally() { fun(); }
};