Merge pull request #148569 from fabaff/bump-adblock
python3Packages.adblock: 0.5.0 -> 0.5.1
This commit is contained in:
commit
2a031b7357
1 changed files with 32 additions and 17 deletions
|
@ -1,12 +1,12 @@
|
||||||
{ stdenv
|
{ lib
|
||||||
, lib
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, openssl
|
, openssl
|
||||||
, publicsuffix-list
|
, publicsuffix-list
|
||||||
, isPy27
|
, pythonOlder
|
||||||
, libiconv
|
, libiconv
|
||||||
, CoreFoundation
|
, CoreFoundation
|
||||||
, Security
|
, Security
|
||||||
|
@ -16,34 +16,46 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "adblock";
|
pname = "adblock";
|
||||||
version = "0.5.0";
|
version = "0.5.1";
|
||||||
disabled = isPy27;
|
format = "pyproject";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
# Pypi only has binary releases
|
# Pypi only has binary releases
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ArniDagur";
|
owner = "ArniDagur";
|
||||||
repo = "python-adblock";
|
repo = "python-adblock";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-JjmMfL24778T6LCuElXsD7cJxQ+RkqbNEnEqwoN24WE=";
|
sha256 = "sha256-f6PmEHVahQv8t+WOkE8DO2emivHG2t14hUSIf/l8omY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||||
inherit src;
|
inherit src;
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
hash = "sha256-w+/W4T3ukRHNpCPjhlHZLPn6sgCpz4QHVD8VW+Rw5BI=";
|
hash = "sha256-x0mcykHWhheD2ycELcfR1ZQ/6WfFQzY+L/LmMipP4Rc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
format = "pyproject";
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
] ++ (with rustPlatform; [
|
||||||
|
cargoSetupHook
|
||||||
|
maturinBuildHook
|
||||||
|
]);
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ]
|
buildInputs = [
|
||||||
++ (with rustPlatform; [ cargoSetupHook maturinBuildHook ]);
|
openssl
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
buildInputs = [ openssl ]
|
libiconv
|
||||||
++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation Security ];
|
CoreFoundation
|
||||||
|
Security
|
||||||
|
];
|
||||||
|
|
||||||
PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat";
|
PSL_PATH = "${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat";
|
||||||
|
|
||||||
checkInputs = [ pytestCheckHook toml ];
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
toml
|
||||||
|
];
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
# import from $out instead
|
# import from $out instead
|
||||||
|
@ -55,12 +67,15 @@ buildPythonPackage rec {
|
||||||
"tests/test_typestubs.py"
|
"tests/test_typestubs.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [ "adblock" "adblock.adblock" ];
|
pythonImportsCheck = [
|
||||||
|
"adblock"
|
||||||
|
"adblock.adblock"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Python wrapper for Brave's adblocking library, which is written in Rust";
|
description = "Python wrapper for Brave's adblocking library";
|
||||||
homepage = "https://github.com/ArniDagur/python-adblock/";
|
homepage = "https://github.com/ArniDagur/python-adblock/";
|
||||||
maintainers = with maintainers; [ petabyteboy dotlambda ];
|
maintainers = with maintainers; [ petabyteboy dotlambda ];
|
||||||
license = with licenses; [ asl20 mit ];
|
license = with licenses; [ asl20 /* or */ mit ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue