2021-04-15 00:37:46 +00:00
|
|
|
{ lib
|
2022-05-18 14:49:53 +00:00
|
|
|
, babel
|
2022-01-26 04:04:25 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitLab
|
2023-03-24 00:07:29 +00:00
|
|
|
, fetchpatch
|
2021-04-15 00:37:46 +00:00
|
|
|
, gnupg
|
|
|
|
, html2text
|
|
|
|
, libyaml
|
|
|
|
, lxml
|
|
|
|
, nose
|
2023-03-24 00:07:29 +00:00
|
|
|
, packaging
|
2023-03-27 19:17:25 +00:00
|
|
|
, pdm-pep517
|
2021-04-15 00:37:46 +00:00
|
|
|
, pillow
|
|
|
|
, prettytable
|
2022-01-26 04:04:25 +00:00
|
|
|
, python-dateutil
|
|
|
|
, pythonOlder
|
2021-04-15 00:37:46 +00:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, termcolor
|
2023-03-24 00:07:29 +00:00
|
|
|
, testers
|
2021-04-15 00:37:46 +00:00
|
|
|
, unidecode
|
2023-03-24 00:07:29 +00:00
|
|
|
, woob
|
2021-04-15 00:37:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "woob";
|
2023-03-27 19:17:25 +00:00
|
|
|
version = "3.4";
|
|
|
|
format = "pyproject";
|
2021-04-15 00:37:46 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "woob";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-27 19:17:25 +00:00
|
|
|
hash = "sha256-qVE1FQK3+jBKIHW+s1iNZwy8Srb2kQhWNTlZyzc1/jE=";
|
2021-04-15 00:37:46 +00:00
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
nativeBuildInputs = [
|
2023-03-24 00:07:29 +00:00
|
|
|
packaging
|
2023-03-27 19:17:25 +00:00
|
|
|
pdm-pep517
|
2021-04-15 00:37:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2021-04-15 00:37:46 +00:00
|
|
|
gnupg
|
|
|
|
html2text
|
|
|
|
libyaml
|
|
|
|
lxml
|
2023-03-24 00:07:29 +00:00
|
|
|
packaging
|
2021-04-15 00:37:46 +00:00
|
|
|
pillow
|
|
|
|
prettytable
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
termcolor
|
|
|
|
unidecode
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2021-04-15 00:37:46 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/woob/woob/-/commit/861b1bb92be53998d8174dcca6fa643d1c7cde12.patch";
|
|
|
|
sha256 = "sha256-IXcE59pMFtPLTOYa2inIvuA14USQvck6Q4hrKZTC0DE=";
|
|
|
|
})
|
|
|
|
];
|
2022-01-26 04:04:25 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-26 04:04:25 +00:00
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
2021-04-15 00:37:46 +00:00
|
|
|
checkPhase = ''
|
|
|
|
nosetests
|
|
|
|
'';
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"woob"
|
|
|
|
];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = woob;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2021-04-15 00:37:46 +00:00
|
|
|
meta = with lib; {
|
2022-01-26 04:04:25 +00:00
|
|
|
description = "Collection of applications and APIs to interact with websites";
|
2021-04-15 00:37:46 +00:00
|
|
|
homepage = "https://woob.tech";
|
|
|
|
license = licenses.lgpl3Plus;
|
2022-01-26 04:04:25 +00:00
|
|
|
maintainers = with maintainers; [ DamienCassou ];
|
|
|
|
};
|
2021-04-15 00:37:46 +00:00
|
|
|
}
|