Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 docopt, 5 fetchFromGitHub, 6 pytestCheckHook, 7 requests, 8 jsonpatch, 9 schema, 10 responses, 11 setuptools, 12 tqdm, 13 urllib3, 14 pythonOlder, 15 importlib-metadata, 16}: 17 18buildPythonPackage rec { 19 pname = "internetarchive"; 20 version = "4.1.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "jjjake"; 27 repo = "internetarchive"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-CqfwAKhrq4VEBU258x19JT8+ay2vOYIzVoFWjAzh3wY="; 30 }; 31 32 nativeBuildInputs = [ setuptools ]; 33 34 propagatedBuildInputs = [ 35 tqdm 36 docopt 37 requests 38 jsonpatch 39 schema 40 urllib3 41 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; 42 43 nativeCheckInputs = [ 44 responses 45 pytestCheckHook 46 ]; 47 48 disabledTests = [ 49 # Tests require network access 50 "test_get_item_with_kwargs" 51 "test_upload" 52 "test_upload_metadata" 53 "test_upload_queue_derive" 54 "test_upload_validate_identifie" 55 "test_upload_validate_identifier" 56 ]; 57 58 disabledTestPaths = [ 59 # Tests require network access 60 "tests/cli/test_ia.py" 61 "tests/cli/test_ia_download.py" 62 ]; 63 64 pythonImportsCheck = [ "internetarchive" ]; 65 66 meta = with lib; { 67 description = "Python and Command-Line Interface to Archive.org"; 68 homepage = "https://github.com/jjjake/internetarchive"; 69 changelog = "https://github.com/jjjake/internetarchive/blob/v${version}/HISTORY.rst"; 70 license = licenses.agpl3Plus; 71 maintainers = [ ]; 72 mainProgram = "ia"; 73 }; 74}