python3Packages.adblock: 0.4.0 -> 0.4.4

authored by

Robert Schütz and committed by
Jonathan Ringer
69c5219c a15bd8e0

+19 -8
+19 -8
pkgs/development/python-modules/adblock/default.nix
··· 3 3 , fetchFromGitHub 4 4 , buildPythonPackage 5 5 , rustPlatform 6 - , pythonImportsCheckHook 7 6 , pkg-config 8 7 , openssl 9 8 , publicsuffix-list ··· 11 10 , libiconv 12 11 , CoreFoundation 13 12 , Security 13 + , pytestCheckHook 14 + , toml 15 + , python 14 16 }: 15 17 16 18 buildPythonPackage rec { 17 19 pname = "adblock"; 18 - version = "0.4.0"; 20 + version = "0.4.4"; 19 21 disabled = isPy27; 20 22 21 23 # Pypi only has binary releases ··· 23 25 owner = "ArniDagur"; 24 26 repo = "python-adblock"; 25 27 rev = version; 26 - sha256 = "10d6ks2fyzbizq3kb69q478idj0h86k6ygjb6wl3zq3mf65ma4zg"; 28 + sha256 = "sha256-zNQ8zEpTLzyU5AnFBNpOGDJ02Ogu2+xl85LA+ia7Si4="; 27 29 }; 28 30 29 31 cargoDeps = rustPlatform.fetchCargoTarball { 30 32 inherit src; 31 33 name = "${pname}-${version}"; 32 - hash = "sha256-gEFmj3/KvhvvsOK2nX2L1RUD4Wfp3nYzEzVnQZIsIDY="; 34 + hash = "sha256-ajVZ0xPxC31hM1gQr3DC1HWdpIYBCSmqm0z2cflcClg="; 33 35 }; 34 36 35 37 format = "pyproject"; 36 38 37 - nativeBuildInputs = [ pkg-config pythonImportsCheckHook ] 39 + nativeBuildInputs = [ pkg-config ] 38 40 ++ (with rustPlatform; [ cargoSetupHook maturinBuildHook ]); 39 41 40 42 buildInputs = [ openssl ] ··· 42 44 43 45 PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"; 44 46 45 - # There are no rust tests 46 - doCheck = false; 47 + checkInputs = [ pytestCheckHook toml ]; 48 + 49 + preCheck = '' 50 + # import from $out instead 51 + rm -r adblock 52 + ''; 53 + 54 + disabledTestPaths = [ 55 + # relies on directory removed above 56 + "tests/test_typestubs.py" 57 + ]; 47 58 48 - pythonImportsCheck = [ "adblock" ]; 59 + pythonImportsCheck = [ "adblock" "adblock.adblock" ]; 49 60 50 61 meta = with lib; { 51 62 description = "Python wrapper for Brave's adblocking library, which is written in Rust";