guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#45018] [PATCH 2/6] daemon: Use 'Agent' to spawn 'guix substitute --


From: Ludovic Courtès
Subject: [bug#45018] [PATCH 2/6] daemon: Use 'Agent' to spawn 'guix substitute --query'.
Date: Sun, 06 Dec 2020 22:51:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Mathieu Othacehe <othacehe@gnu.org> skribis:

>> +         (("--substitute" store-path destination)
>> +          ;; Download STORE-PATH and add store it as a Nar in file 
>> DESTINATION.
>
> add it to store?

Oops.

>> +    const Strings args = { "substitute", "--query" };
>> +    const std::map<string, string> env = { { "_NIX_OPTIONS", 
>> settings.pack() } };
>> +    std::unique_ptr<Agent>fresh(new Agent(settings.guixProgram, args, env));
>
> You should prefer make_unique to "new" calls.

Apparently ‘make_unique’ is a C++14 thing and we don’t build against
that standard (yet), so I left it as is.  The next patch removes this
use of ‘unique_ptr’ anyway.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]