fix: example aux packages eval (#25)
- add namespace for `aux.a`, `aux.b`, `aux.c`'s builder config - break an infinite recursion of `aux.a`'s install phase depending on its own derivation's `outPath` Co-authored-by: austreelis <git@swhaele.net> Reviewed-on: #25 Reviewed-by: vlinkz <vlinkz@snowflakeos.org> Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org> Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
This commit is contained in:
parent
ab85ed8550
commit
956d1447d1
3 changed files with 20 additions and 14 deletions
|
|
@ -27,23 +27,29 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
builder = builders.basic;
|
||||
builder = builders.foundation.basic;
|
||||
|
||||
deps.host.host = {
|
||||
inherit (packages.aux) b;
|
||||
};
|
||||
|
||||
phases = ctx: {
|
||||
install = ''
|
||||
echo "a with b: ${config.deps.host.host.b.platform.host}" > $out
|
||||
echo >> $out
|
||||
echo a=$out >> $out
|
||||
echo b=$AUX_B >> $out
|
||||
echo c=$AUX_C >> $out
|
||||
echo >> $out
|
||||
echo '${ctx}' >> $out
|
||||
'';
|
||||
};
|
||||
phases =
|
||||
ctx':
|
||||
let
|
||||
# break recursion on the derivation outPath itself
|
||||
ctx = builtins.removeAttrs ctx' [ "package" ];
|
||||
in
|
||||
{
|
||||
install = ''
|
||||
echo "a with b: ${config.deps.host.host.b.platform.host}" > $out
|
||||
echo >> $out
|
||||
echo a=$out >> $out
|
||||
echo b=$AUX_B >> $out
|
||||
echo c=$AUX_C >> $out
|
||||
echo >> $out
|
||||
echo '${ctx}' >> $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ in
|
|||
|
||||
custom = true;
|
||||
|
||||
builder = builders.basic;
|
||||
builder = builders.foundation.basic;
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ in
|
|||
|
||||
custom = true;
|
||||
|
||||
builder = builders.basic;
|
||||
builder = builders.foundation.basic;
|
||||
|
||||
context = {
|
||||
"foundation:cflags" = [ "-I $AUX_C/include" ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue