at 24.05-pre 91 lines 1.6 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4 5# build-system 6, setuptools 7 8# dependencies 9, django 10 11# optional-dependencies 12, azure-storage-blob 13, boto3 14, dropbox 15, google-cloud-storage 16, libcloud 17, paramiko 18 19# tests 20, cryptography 21, moto 22, pytestCheckHook 23, rsa 24}: 25 26buildPythonPackage rec { 27 pname = "django-storages"; 28 version = "1.14"; 29 format = "pyproject"; 30 31 src = fetchFromGitHub { 32 owner = "jschneier"; 33 repo = "django-storages"; 34 rev = "refs/tags/${version}"; 35 hash = "sha256-q+vQm1T5/ueGPfwzuUOmSI/nESchqJc4XizJieBsLWc="; 36 }; 37 38 nativeBuildInputs = [ 39 setuptools 40 ]; 41 42 propagatedBuildInputs = [ 43 django 44 ]; 45 46 passthru.optional-dependencies = { 47 azure = [ 48 azure-storage-blob 49 ]; 50 boto3 = [ 51 boto3 52 ]; 53 dropbox = [ 54 dropbox 55 ]; 56 google = [ 57 google-cloud-storage 58 ]; 59 libcloud = [ 60 libcloud 61 ]; 62 s3 = [ 63 boto3 64 ]; 65 sftp = [ 66 paramiko 67 ]; 68 }; 69 70 pythonImportsCheck = [ 71 "storages" 72 ]; 73 74 env.DJANGO_SETTINGS_MODULE = "tests.settings"; 75 76 nativeCheckInputs = [ 77 cryptography 78 moto 79 pytestCheckHook 80 rsa 81 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 82 83 meta = with lib; { 84 changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst"; 85 description = "Collection of custom storage backends for Django"; 86 downloadPage = "https://github.com/jschneier/django-storages/"; 87 homepage = "https://django-storages.readthedocs.io"; 88 license = licenses.bsd3; 89 maintainers = with maintainers; [ mmai ]; 90 }; 91}