Merge pull request #304810 from ju1m/dnscrypt-proxy2

nixos/dnscrypt-proxy2: fix cross-compiling
This commit is contained in:
Atemu 2024-04-18 09:04:41 +02:00 committed by GitHub
commit 3bdc0e7715
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -49,12 +49,12 @@ in
passAsFile = [ "json" ];
} ''
${if cfg.upstreamDefaults then ''
${pkgs.remarshal}/bin/toml2json ${pkgs.dnscrypt-proxy.src}/dnscrypt-proxy/example-dnscrypt-proxy.toml > example.json
${pkgs.jq}/bin/jq --slurp add example.json $jsonPath > config.json # merges the two
${pkgs.buildPackages.remarshal}/bin/toml2json ${pkgs.dnscrypt-proxy.src}/dnscrypt-proxy/example-dnscrypt-proxy.toml > example.json
${pkgs.buildPackages.jq}/bin/jq --slurp add example.json $jsonPath > config.json # merges the two
'' else ''
cp $jsonPath config.json
''}
${pkgs.remarshal}/bin/json2toml < config.json > $out
${pkgs.buildPackages.remarshal}/bin/json2toml < config.json > $out
'';
defaultText = literalMD "TOML file generated from {option}`services.dnscrypt-proxy2.settings`";
};