#pragma once #include #include "hash.hh" #include "derivations.hh" #include "store-api.hh" struct BuildProduct { nix::Path path, defaultPath; std::string type, subtype, name; bool isRegular = false; nix::Hash sha1hash, sha256hash; off_t fileSize = 0; BuildProduct() { } }; struct BuildMetric { std::string name, unit; double value; }; struct BuildOutput { /* Whether this build has failed with output, i.e., the build finished with exit code 0 but produced a file $out/nix-support/failed. */ bool failed = false; std::string releaseName; unsigned long long closureSize = 0, size = 0; std::list products; std::map metrics; }; BuildOutput getBuildOutput(nix::ref store, nix::ref accessor, const nix::Derivation & drv);