dnscrypt-proxy: Make FHS compliant and fix cache (#448491)
This commit is contained in:
@@ -67,7 +67,7 @@ in
|
||||
${
|
||||
if cfg.upstreamDefaults then
|
||||
''
|
||||
${pkgs.buildPackages.remarshal}/bin/toml2json ${pkgs.dnscrypt-proxy.src}/dnscrypt-proxy/example-dnscrypt-proxy.toml > example.json
|
||||
${pkgs.buildPackages.remarshal}/bin/toml2json ${pkgs.dnscrypt-proxy}/etc/dnscrypt-proxy/dnscrypt-proxy.toml > example.json
|
||||
${pkgs.buildPackages.jq}/bin/jq --slurp add example.json $jsonPath > config.json # merges the two
|
||||
''
|
||||
else
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
@@ -20,6 +21,18 @@ buildGoModule rec {
|
||||
hash = "sha256-JPBAlRpJw6Oy4f3twyhX95XqWFtUTEFPjwyVaNMSHmQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/dnscrypt-proxy/-/raw/main/0001-Make-configuration-file-hierarchy-compliant.patch";
|
||||
hash = "sha256-qsbKcgeB/g388TERH8nYy/kfMSN5a21fbUoa80ZMgW4=";
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/etc/dnscrypt-proxy
|
||||
cp dnscrypt-proxy/example-dnscrypt-proxy.toml $out/etc/dnscrypt-proxy/dnscrypt-proxy.toml
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) dnscrypt-proxy; };
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user