nixos/vector: fix validation for cross compiling

This commit is contained in:
Sandro Jäckel 2022-09-08 01:25:30 +02:00 committed by Yt
parent 6ee982a34e
commit 08dd3b91ea

View File

@ -43,8 +43,10 @@ in
format = pkgs.formats.toml { }; format = pkgs.formats.toml { };
conf = format.generate "vector.toml" cfg.settings; conf = format.generate "vector.toml" cfg.settings;
validateConfig = file: validateConfig = file:
pkgs.runCommand "validate-vector-conf" { } '' pkgs.runCommand "validate-vector-conf" {
${pkgs.vector}/bin/vector validate --no-environment "${file}" nativeBuildInputs = [ pkgs.buildPackages.vector ];
} ''
vector validate --no-environment "${file}"
ln -s "${file}" "$out" ln -s "${file}" "$out"
''; '';
in in