default.nix (915B)
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 src = fetchFromGitHub { 12 owner = "depler"; 13 repo = "dns-filter"; 14 rev = "f2e9c9b451cc4caa52e61b464f73c166313fc8b6"; 15 hash = "sha256-WK3xlJFlYc6u03+6HSoyBaoC9VtD/i7cP1+oqpH/sfE="; 16 }; 17 18 postPatch = '' 19 substituteInPlace build.sh --replace-fail "gcc" "cc" 20 ''; 21 22 buildPhase = '' 23 sh ./build.sh 24 ''; 25 26 env.NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion -Wno-error=implicit-function-declaration"; 27 28 installPhase = '' 29 install -Dm755 dns-filter -t $out/bin 30 install -Dm644 *.txt -t $out/share/dns-filter 31 ''; 32 33 meta = { 34 description = "Tiny DNS server with filtering requests"; 35 homepage = "https://github.com/depler/dns-filter"; 36 license = lib.licenses.free; 37 maintainers = [ lib.maintainers.sikmir ]; 38 platforms = lib.platforms.unix; 39 }; 40 }