33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
60 lines
1.1 KiB
Nix
60 lines
1.1 KiB
Nix
{ buildPythonPackage
|
|
, fetchPypi
|
|
, pytest
|
|
, tqdm
|
|
, docopt
|
|
, requests
|
|
, jsonpatch
|
|
, schema
|
|
, responses
|
|
, lib
|
|
, glibcLocales
|
|
, setuptools
|
|
, urllib3
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "internetarchive";
|
|
version = "3.2.0";
|
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-cB7nRDmO2NNaHjNkHCuXH0+15WZfxseS8DBdIqefSzk=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
tqdm
|
|
docopt
|
|
requests
|
|
jsonpatch
|
|
schema
|
|
setuptools # needs pkg_resources at runtime
|
|
urllib3
|
|
];
|
|
|
|
nativeCheckInputs = [ 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 ];
|
|
mainProgram = "ia";
|
|
};
|
|
}
|