2015-05-28 17:39:29 +02:00
|
|
|
#pragma once
|
|
|
|
|
2015-05-29 01:31:12 +02:00
|
|
|
#include <memory>
|
|
|
|
|
2015-05-28 17:39:29 +02:00
|
|
|
#include "hash.hh"
|
|
|
|
#include "derivations.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 BuildResult
|
|
|
|
{
|
2015-06-17 17:11:42 +02:00
|
|
|
/* 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;
|
|
|
|
|
2015-05-28 17:39:29 +02:00
|
|
|
std::string releaseName;
|
|
|
|
|
|
|
|
unsigned long long closureSize = 0, size = 0;
|
|
|
|
|
|
|
|
std::list<BuildProduct> products;
|
|
|
|
};
|
|
|
|
|
2015-05-29 01:31:12 +02:00
|
|
|
BuildResult getBuildResult(std::shared_ptr<nix::StoreAPI> store, const nix::Derivation & drv);
|