17 buildPythonPackage rec {
22 disabled = pythonOlder "3.7";
24 # Pypi only has binary releases
25 src = fetchFromGitHub {
27 repo = "python-adblock";
28 rev = "refs/tags/${version}";
29 hash = "sha256-5g5xdUzH/RTVwu4Vfb5Cb1t0ruG0EXgiXjrogD/+JCU=";
32 cargoDeps = rustPlatform.fetchCargoTarball {
34 name = "${pname}-${version}";
35 hash = "sha256-1xmYmF5P7a5O9MilxDy+CVhmWMGRetdM2fGvTPy7JmM=";
40 ] ++ (with rustPlatform; [
47 ] ++ lib.optionals stdenv.isDarwin [
53 PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat";
61 # import from $out instead
66 # relies on directory removed above
67 "tests/test_typestubs.py"
70 pythonImportsCheck = [
76 description = "Python wrapper for Brave's adblocking library";
77 homepage = "https://github.com/ArniDagur/python-adblock/";
78 maintainers = with maintainers; [ dotlambda ];
79 license = with licenses; [ asl20 /* or */ mit ];