| 11 Mar 2026 |
pveierland | 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 |
| Christian Theune changed their display name from Theuni to Christian Theune. | 14:11:47 |
| Tyler_PB joined the room. | 19:49:40 |
Lisanna | I'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 |
Sergei Zimmerman (xokdvium) | I think source.drainInto(sink) is good for this, there are different overloads. A buffered sink only cares about having one writer | 22:10:32 |
Sergei Zimmerman (xokdvium) | (Same for the source too) | 22:10:55 |
Lisanna | alright, I'll give it a shot <3 | 22:13:57 |
Lisanna | man I don't even have nix registry resolve, is it new? | 22:17:41 |
Lisanna | 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 | * 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 | Yeah, November 2025: https://github.com/NixOS/nix/commit/063cdb5508bb4a6917eff25e8f8da55ecfedae2e | 00:28:38 |
Lisanna | yep, it works! | 01:16:43 |