3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/nxdomain/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

30 lines
793 B
Nix

{ lib, buildPythonApplication, fetchPypi, dnspython, pytestCheckHook }:
buildPythonApplication rec {
pname = "nxdomain";
version = "1.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "0va7nkbdjgzrf7fnbxkh1140pbc62wyj86rdrrh5wmg3phiziqkb";
};
propagatedBuildInputs = [ dnspython ];
nativeCheckInputs = [ pytestCheckHook ];
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;
license = licenses.gpl3Only;
maintainers = with maintainers; [ zopieux ];
};
}