2019-10-21 18:17:15 +03:00
|
|
|
#pragma once
|
2023-04-01 06:18:41 +03:00
|
|
|
///@file
|
2019-10-21 18:17:15 +03:00
|
|
|
|
|
|
|
#include "derivations.hh"
|
|
|
|
#include "store-api.hh"
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
struct Package {
|
|
|
|
Path path;
|
|
|
|
bool active;
|
|
|
|
int priority;
|
2019-12-11 15:53:30 +02:00
|
|
|
Package(const Path & path, bool active, int priority) : path{path}, active{active}, priority{priority} {}
|
2019-10-21 18:17:15 +03:00
|
|
|
};
|
|
|
|
|
2023-02-08 21:03:57 +02:00
|
|
|
class BuildEnvFileConflictError : public Error
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
const Path fileA;
|
|
|
|
const Path fileB;
|
|
|
|
int priority;
|
|
|
|
|
|
|
|
BuildEnvFileConflictError(
|
|
|
|
const Path fileA,
|
|
|
|
const Path fileB,
|
|
|
|
int priority
|
|
|
|
)
|
|
|
|
: Error(
|
|
|
|
"Unable to build profile. There is a conflict for the following files:\n"
|
|
|
|
"\n"
|
|
|
|
" %1%\n"
|
|
|
|
" %2%",
|
|
|
|
fileA,
|
|
|
|
fileB
|
|
|
|
)
|
|
|
|
, fileA(fileA)
|
|
|
|
, fileB(fileB)
|
|
|
|
, priority(priority)
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2019-10-21 18:17:15 +03:00
|
|
|
typedef std::vector<Package> Packages;
|
|
|
|
|
|
|
|
void buildProfile(const Path & out, Packages && pkgs);
|
|
|
|
|
|
|
|
void builtinBuildenv(const BasicDerivation & drv);
|
|
|
|
|
|
|
|
}
|