a20d26806f
Co-authored-by: Fabian Affolter <fabian@affolter-engineering.ch>
60 lines
1.1 KiB
Nix
60 lines
1.1 KiB
Nix
{ buildPythonPackage
|
|
, fetchPypi
|
|
, pytest
|
|
, six
|
|
, tqdm
|
|
, pyyaml
|
|
, docopt
|
|
, requests
|
|
, jsonpatch
|
|
, args
|
|
, schema
|
|
, responses
|
|
, backports_csv
|
|
, isPy3k
|
|
, lib
|
|
, glibcLocales
|
|
, setuptools
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "internetarchive";
|
|
version = "2.0.2";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "515e6646a2b917c15f2241670d21f14a014b9c67dc509aef4d4aca5a59cdda65";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
six
|
|
tqdm
|
|
pyyaml
|
|
docopt
|
|
requests
|
|
jsonpatch
|
|
args
|
|
schema
|
|
setuptools
|
|
] ++ lib.optionals (!isPy3k) [ backports_csv ];
|
|
|
|
checkInputs = [ pytest responses glibcLocales ];
|
|
|
|
# tests depend on network
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
LC_ALL=en_US.utf-8 pytest tests
|
|
'';
|
|
|
|
pythonImportsCheck = [ "internetarchive" ];
|
|
|
|
meta = with lib; {
|
|
description = "A Python and Command-Line Interface to Archive.org";
|
|
homepage = "https://github.com/jjjake/internetarchive";
|
|
changelog = "https://github.com/jjjake/internetarchive/raw/v${version}/HISTORY.rst";
|
|
license = licenses.agpl3Plus;
|
|
maintainers = [ maintainers.marsam ];
|
|
};
|
|
}
|