From a969fffac9dc97a5a15dac41c1d2ccebb045c279 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 5 Jun 2024 14:16:11 +0200 Subject: [PATCH] fix: use `lib.recursiveUpdate` by default the custom `recursiveMerge` function was not working as expected. Signed-off-by: Harald Hoyer --- lib/default.nix | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 0de8b6e..b184b23 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -27,22 +27,6 @@ _: }: assert lib.assertMsg (!(isAzure && sgx_default_qcnl_conf != null)) "sgx_default_qcnl_conf can't be set for Azure"; let - recursiveMerge = attrList: - with lib; - let - f = attrPath: - zipAttrsWith (n: values: - if tail values == [ ] - then head values - else if all isList values - then unique (concatLists values) - else if all isAttrs values - then f (attrPath ++ [ n ]) values - else last values - ); - in - f [ ] attrList; - manifest_base = { libos = { inherit entrypoint; }; fs = { @@ -93,9 +77,7 @@ _: }; }; - mergedManifest = ((if customRecursiveMerge == null then recursiveMerge else customRecursiveMerge) [ manifest_base manifest ]) - # Don't merge the `loader.argv` array - // { loader.argv = lib.attrsets.attrByPath [ "loader" "argv" ] manifest_base.loader.argv manifest; }; + mergedManifest = (if customRecursiveMerge == null then lib.recursiveUpdate else customRecursiveMerge) manifest_base manifest; tomlFormat = pkgs.formats.toml { }; manifestFile = tomlFormat.generate "${name}.manifest.toml" mergedManifest;