mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
nixos/athens: Replace custom jq-based runCommand with pkgs.formats
This commit is contained in:
@@ -140,12 +140,10 @@ let
|
||||
}
|
||||
);
|
||||
|
||||
configFile = pkgs.runCommandLocal "config.toml" { } ''
|
||||
${pkgs.buildPackages.jq}/bin/jq 'del(..|nulls)' \
|
||||
< ${pkgs.writeText "config.json" (builtins.toJSON athensConfig)} | \
|
||||
${pkgs.buildPackages.remarshal}/bin/remarshal -if json -of toml \
|
||||
> $out
|
||||
'';
|
||||
configFile = lib.pipe athensConfig [
|
||||
(lib.filterAttrsRecursive (_k: v: v != null))
|
||||
((pkgs.formats.toml {}).generate "config.toml")
|
||||
];
|
||||
in
|
||||
{
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user