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: 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





reply via email to

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