nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 libsodium,
7 nix-update-script,
8 versionCheckHook,
9}:
10rustPlatform.buildRustPackage rec {
11 pname = "encrypted-dns-server";
12 version = "0.9.18";
13
14 src = fetchFromGitHub {
15 owner = "DNSCrypt";
16 repo = "encrypted-dns-server";
17 tag = version;
18 hash = "sha256-YM9ow1j5G6AN91/YLnRy+jOlpQPBxZa+chNZNPGUfhs=";
19 };
20
21 cargoHash = "sha256-cHARkL8gbNBlmjbJaHJ8w268KcXTJr2PvCF+I6+K0s8=";
22
23 nativeBuildInputs = [ pkg-config ];
24
25 buildInputs = [ libsodium ];
26
27 env = {
28 SODIUM_USE_PKG_CONFIG = true;
29 };
30
31 passthru.updateScript = nix-update-script { };
32
33 nativeInstallCheckInputs = [ versionCheckHook ];
34 doInstallCheck = true;
35 versionCheckProgram = "${placeholder "out"}/bin/encrypted-dns";
36
37 meta = {
38 changelog = "https://github.com/DNSCrypt/encrypted-dns-server/releases/tag/${version}";
39 description = "Easy to install, high-performance, zero maintenance proxy to run an encrypted DNS server";
40 homepage = "https://github.com/DNSCrypt/encrypted-dns-server";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ paepcke ];
43 mainProgram = "encrypted-dns";
44 };
45}