!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

895 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.188 Servers

Load older messages


SenderMessageTime
11 Mar 2026
@pveierland:matrix.orgpveierland Did something change in the behavior of indirect flakeref resolution? nix registry resolve nixpkgs/a3a3dda3bacf61e8a39258a0ed9c924eeca8e293 works but nix registry resolve nixpkgs/nixos-unstable/a3a3dda3bacf61e8a39258a0ed9c924eeca8e293 fails with error: cannot apply both a commit hash (a3a3dda3bacf61e8a39258a0ed9c924eeca8e293) and a branch/tag name ('nixos-unstable') to input 'github:NixOS/nixpkgs/nixpkgs-unstable' 09:30:45
@ctheune:matrix.flyingcircus.ioChristian Theune changed their display name from Theuni to Christian Theune.14:11:47
@tyler_pb:matrix.orgTyler_PB joined the room.19:49:40
@lisanna-dettwyler:matrix.orgLisannaI'm trying to think of a way to asynchronously drain a file descriptor into a sink, is it safe to write to a sink from a different thread, assuming that's the only writer?21:51:32
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I think source.drainInto(sink) is good for this, there are different overloads. A buffered sink only cares about having one writer22:10:32
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)(Same for the source too)22:10:55
@lisanna-dettwyler:matrix.orgLisannaalright, I'll give it a shot <322:13:57
@lisanna-dettwyler:matrix.orgLisanna man I don't even have nix registry resolve, is it new? 22:17:41
@lisanna-dettwyler:matrix.orgLisanna

Gonna try something like this:

AsyncPostBuildHookInfo info;
info.act = std::make_unique<Activity>(
    *logger,
    lvlTalkative,
    actPostBuildHook,
    fmt("running async-post-build-hook '%s'", worker.settings.asyncPostBuildHook),
    Logger::Fields{worker.store.printStorePath(drvPath)});
info.sink = std::make_unique<LogSink>(*info.act);
info.out = std::make_unique<Pipe>();
info.out->create();
info.out->writeSide.close();
info.handleOutput = std::thread([&](Descriptor readSide, Sink & sink) {
    drainFD(readSide, sink);
}, info.out->readSide.get(), *info.sink);

// PushActivity pact(info.act->id);

auto pid = runAsyncPostBuildHook(worker.settings, worker.store, *info.out, drvPath, outputPaths);

worker.asyncPostBuildHooks[pid] = std::move(info);
23:03:32
@lisanna-dettwyler:matrix.orgLisanna *

Gonna try something like this:

AsyncPostBuildHookInfo info;
info.act = std::make_unique<Activity>(
    *logger,
    lvlTalkative,
    actPostBuildHook,
    fmt("running async-post-build-hook '%s'", worker.settings.asyncPostBuildHook),
    Logger::Fields{worker.store.printStorePath(drvPath)});
info.sink = std::make_unique<LogSink>(*info.act);
info.out = std::make_unique<Pipe>();
info.out->create();
info.out->writeSide.close();
info.handleOutput = std::thread([](Descriptor readSide, Sink & sink) {
    drainFD(readSide, sink);
}, info.out->readSide.get(), *info.sink);

// PushActivity pact(info.act->id);

auto pid = runAsyncPostBuildHook(worker.settings, worker.store, *info.out, drvPath, outputPaths);

worker.asyncPostBuildHooks[pid] = std::move(info);
23:04:31
12 Mar 2026
@pveierland:matrix.orgpveierlandYeah, November 2025: https://github.com/NixOS/nix/commit/063cdb5508bb4a6917eff25e8f8da55ecfedae2e00:28:38
@lisanna-dettwyler:matrix.orgLisannayep, it works!01:16:43

There are no newer messages yet.


Back to Room ListRoom Version: 6