nixpkgs/pkgs/development/python-modules/internetarchive/default.nix

60 lines
1.0 KiB
Nix
Raw Normal View History

{ buildPythonPackage
, fetchFromGitHub
, pytest
, six
, tqdm
, pyyaml
, docopt
, requests
, jsonpatch
, args
, schema
, responses
, backports_csv
, isPy3k
, lib
, glibcLocales
, setuptools
}:
2017-09-16 22:41:09 +00:00
buildPythonPackage rec {
pname = "internetarchive";
version = "1.9.3";
2017-09-16 22:41:09 +00:00
# Can't use pypi, data files for tests missing
src = fetchFromGitHub {
owner = "jjjake";
repo = "internetarchive";
rev = "v${version}";
sha256 = "19av6cpps2qldfl3wb9mcirs1a48a4466m1v9k9yhdznqi4zb0ji";
2017-09-16 22:41:09 +00:00
};
2018-11-18 01:22:38 +00:00
propagatedBuildInputs = [
six
tqdm
2018-11-18 01:22:38 +00:00
pyyaml
docopt
requests
jsonpatch
args
schema
setuptools
] ++ lib.optionals (!isPy3k) [ backports_csv ];
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
checkInputs = [ pytest responses glibcLocales ];
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
# tests depend on network
doCheck = false;
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
checkPhase = ''
LC_ALL=en_US.utf-8 pytest tests
'';
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
meta = with lib; {
description = "A Python and Command-Line Interface to Archive.org";
homepage = "https://github.com/jjjake/internetarchive";
2017-09-16 22:41:09 +00:00
license = licenses.agpl3;
maintainers = [ maintainers.marsam ];
2017-09-16 22:41:09 +00:00
};
}