2020-11-03 02:18:15 +00:00
|
|
|
{ lib, buildPythonApplication, fetchPypi, dnspython, pytestCheckHook }:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "nxdomain";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "1.0.2";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "0va7nkbdjgzrf7fnbxkh1140pbc62wyj86rdrrh5wmg3phiziqkb";
|
2020-11-03 02:18:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ dnspython ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
echo example.org > simple.list
|
|
|
|
python -m nxdomain --format dnsmasq --out dnsmasq.conf --simple ./simple.list
|
|
|
|
grep -q 'address=/example.org/' dnsmasq.conf
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/zopieux/nxdomain";
|
|
|
|
description = "A domain (ad) block list creator";
|
|
|
|
platforms = platforms.all;
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-11-03 02:18:15 +00:00
|
|
|
maintainers = with maintainers; [ zopieux ];
|
|
|
|
};
|
|
|
|
}
|