nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 33aeaba2f25f69697f0143c4c2db196c0b0c5bc4
parent 6d17964646e086c57baf244658225eb6effc63c4
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Wed, 20 Apr 2022 17:53:44 +0300

Add dns-filter

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/misc/dns-filter/default.nix | 34++++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -280,6 +280,7 @@ lib.makeScope newScope ( csvquote = callPackage ./misc/csvquote { }; csvtools = callPackage ./misc/csvtools { }; didder = callPackage ./misc/didder { }; + dns-filter = callPackage ./misc/dns-filter { }; docker-reg-tool = callPackage ./misc/docker-reg-tool { }; docx2csv = callPackage ./misc/docx2csv { }; finalcut = callPackage ./misc/finalcut { }; diff --git a/pkgs/misc/dns-filter/default.nix b/pkgs/misc/dns-filter/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "dns-filter"; + version = "2021-04-14"; + + src = fetchFromGitHub { + owner = "depler"; + repo = pname; + rev = "f2e9c9b451cc4caa52e61b464f73c166313fc8b6"; + hash = "sha256-WK3xlJFlYc6u03+6HSoyBaoC9VtD/i7cP1+oqpH/sfE="; + }; + + postPatch = '' + substituteInPlace build.sh --replace "gcc" "cc" + ''; + + buildPhase = '' + sh ./build.sh + ''; + + installPhase = '' + install -Dm755 dns-filter -t $out/bin + install -Dm644 *.txt -t $out/share/dns-filter + ''; + + meta = with lib; { + description = "Tiny DNS server with filtering requests"; + inherit (src.meta) homepage; + license = licenses.free; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}