1{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libsodium, libevent, nixosTests }:
2
3stdenv.mkDerivation rec {
4 pname = "dnscrypt-wrapper";
5 version = "0.4.2";
6
7 src = fetchFromGitHub {
8 owner = "Cofyc";
9 repo = "dnscrypt-wrapper";
10 rev = "v${version}";
11 sha256 = "055vxpcfg80b1456p6p0p236pwykknph9x3c9psg8ya3i8qqywkl";
12 };
13
14 enableParallelBuilding = true;
15
16 # causes `dnscrypt-wrapper --gen-provider-keypair` to crash
17 hardeningDisable = [ "fortify3" ];
18
19 nativeBuildInputs = [ pkg-config autoreconfHook ];
20 buildInputs = [ libsodium libevent ];
21
22 passthru.tests = {
23 inherit (nixosTests) dnscrypt-wrapper;
24 };
25
26 meta = with lib; {
27 description = "A tool for adding dnscrypt support to any name resolver";
28 homepage = "https://dnscrypt.info/";
29 license = licenses.isc;
30 maintainers = with maintainers; [ joachifm ];
31 platforms = platforms.linux;
32 };
33}