[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: |
Mathieu Othacehe |
Subject: |
[bug#45018] [PATCH 2/6] daemon: Use 'Agent' to spawn 'guix substitute --query'. |
Date: |
Fri, 04 Dec 2020 09:23:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hey,
> + (("--substitute" store-path destination)
> + ;; Download STORE-PATH and add store it as a Nar in file
> DESTINATION.
add it to store?
> + 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.
> - std::unique_ptr<RunningSubstituter>fresh(new RunningSubstituter);
> + 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));
Ditto.
Thanks,
Mathieu
[bug#45018] [PATCH 0/6] Process and connection reuse for substitutions, 宋文武, 2020/12/03
[bug#45018] [PATCH 0/6] Process and connection reuse for substitutions, Ludovic Courtès, 2020/12/03