buildCrystalPackage: fix env overrides

Passing variables through `env` was broken for 2 reasons:

1. due to missing parens, no merging of `env` would take place, and
2. it was impossible to override defaults due to the order
This commit is contained in:
Peter H. Hoeg
2026-03-29 11:00:51 +02:00
parent 85b9eb70a3
commit 05f00b2fde
@@ -108,11 +108,12 @@ stdenv.mkDerivation (
++ [ "runHook postConfigure" ]
));
env = args.env or { } // {
env = {
CRFLAGS = lib.concatStringsSep " " defaultOptions;
PREFIX = placeholder "out";
};
}
// (args.env or { });
inherit enableParallelBuilding;
strictDeps = true;
@@ -205,8 +206,9 @@ stdenv.mkDerivation (
done
'';
meta = args.meta or { } // {
platforms = args.meta.platforms or crystal.meta.platforms;
};
meta = {
platforms = crystal.meta.platforms;
}
// (args.meta or { });
}
)