Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
buildenv.hh
Go to the documentation of this file.
1#pragma once
3
4#include "store-api.hh"
5
6namespace nix {
7
11struct Package {
12 Path path;
13 bool active;
14 int priority;
15 Package(const Path & path, bool active, int priority) : path{path}, active{active}, priority{priority} {}
16};
17
18class BuildEnvFileConflictError : public Error
19{
20public:
21 const Path fileA;
22 const Path fileB;
23 int priority;
24
25 BuildEnvFileConflictError(
26 const Path fileA,
27 const Path fileB,
28 int priority
29 )
30 : Error(
31 "Unable to build profile. There is a conflict for the following files:\n"
32 "\n"
33 " %1%\n"
34 " %2%",
35 fileA,
36 fileB
37 )
38 , fileA(fileA)
39 , fileB(fileB)
40 , priority(priority)
41 {}
42};
43
44typedef std::vector<Package> Packages;
45
46void buildProfile(const Path & out, Packages && pkgs);
47
48void builtinBuildenv(
49 const BasicDerivation & drv,
50 const std::map<std::string, Path> & outputs);
51
52}
Definition derivations.hh:285
std::string Path
Definition types.hh:22