package.nix (982B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 }: 6 7 stdenv.mkDerivation { 8 pname = "dns-filter"; 9 version = "0-unstable-2021-04-14"; 10 11 __structuredAttrs = true; 12 13 src = fetchFromGitHub { 14 owner = "depler"; 15 repo = "dns-filter"; 16 rev = "f2e9c9b451cc4caa52e61b464f73c166313fc8b6"; 17 hash = "sha256-WK3xlJFlYc6u03+6HSoyBaoC9VtD/i7cP1+oqpH/sfE="; 18 }; 19 20 postPatch = '' 21 substituteInPlace build.sh --replace-fail "gcc" "cc" 22 ''; 23 24 buildPhase = '' 25 sh ./build.sh 26 ''; 27 28 env.NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types"; 29 30 installPhase = '' 31 install -Dm755 dns-filter -t $out/bin 32 install -Dm644 *.txt -t $out/share/dns-filter 33 ''; 34 35 meta = { 36 description = "Tiny DNS server with filtering requests"; 37 homepage = "https://github.com/depler/dns-filter"; 38 license = lib.licenses.free; 39 maintainers = [ lib.maintainers.sikmir ]; 40 platforms = lib.platforms.unix; 41 }; 42 }
