6 , pythonImportsCheckHook
15 buildPythonPackage rec {
20 # Pypi only has binary releases
21 src = fetchFromGitHub {
23 repo = "python-adblock";
25 sha256 = "10d6ks2fyzbizq3kb69q478idj0h86k6ygjb6wl3zq3mf65ma4zg";
28 cargoDeps = rustPlatform.fetchCargoTarball {
30 name = "${pname}-${version}";
31 hash = "sha256-gEFmj3/KvhvvsOK2nX2L1RUD4Wfp3nYzEzVnQZIsIDY=";
36 nativeBuildInputs = [ pkg-config pythonImportsCheckHook ]
37 ++ (with rustPlatform; [ cargoSetupHook maturinBuildHook ]);
39 buildInputs = [ openssl ]
40 ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
42 PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat";
44 # There are no rust tests
47 pythonImportsCheck = [ "adblock" ];
50 description = "Python wrapper for Brave's adblocking library, which is written in Rust";
51 homepage = "https://github.com/ArniDagur/python-adblock/";
52 maintainers = with maintainers; [ petabyteboy ];
53 license = with licenses; [ asl20 mit ];