nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 79 lines 1.8 kB view raw
1{ 2 lib, 3 azure-storage-blob, 4 boto3, 5 buildPythonPackage, 6 cryptography, 7 django, 8 dropbox, 9 fetchFromGitHub, 10 fetchpatch, 11 google-cloud-storage, 12 libcloud, 13 moto, 14 paramiko, 15 pynacl, 16 pytestCheckHook, 17 rsa, 18 setuptools, 19}: 20 21buildPythonPackage rec { 22 pname = "django-storages"; 23 version = "1.14.6"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "jschneier"; 28 repo = "django-storages"; 29 tag = version; 30 hash = "sha256-br7JGPf5EAAl0Qg7b+XaksxNPCTJsSS8HLgvA0wZmeI="; 31 }; 32 33 patches = [ 34 # Add Moto 5 support 35 # https://github.com/jschneier/django-storages/pull/1464 36 (fetchpatch { 37 url = "https://github.com/jschneier/django-storages/commit/e1aedcf2d137f164101d31f2f430f1594eedd78c.patch"; 38 hash = "sha256-jSb/uJ0RXvPsXl+WUAzAgDvJl9Y3ad2F30X1SbsCc04="; 39 name = "add_moto_5_support.patch"; 40 }) 41 ]; 42 43 build-system = [ setuptools ]; 44 45 dependencies = [ django ]; 46 47 optional-dependencies = { 48 azure = [ azure-storage-blob ]; 49 boto3 = [ boto3 ]; 50 dropbox = [ dropbox ]; 51 google = [ google-cloud-storage ]; 52 libcloud = [ libcloud ]; 53 s3 = [ boto3 ]; 54 sftp = [ paramiko ]; 55 }; 56 57 nativeCheckInputs = [ 58 cryptography 59 moto 60 pytestCheckHook 61 rsa 62 ] 63 ++ lib.concatAttrValues optional-dependencies; 64 65 checkInputs = [ pynacl ]; 66 67 pythonImportsCheck = [ "storages" ]; 68 69 env.DJANGO_SETTINGS_MODULE = "tests.settings"; 70 71 meta = { 72 description = "Collection of custom storage backends for Django"; 73 changelog = "https://github.com/jschneier/django-storages/blob/${version}/CHANGELOG.rst"; 74 downloadPage = "https://github.com/jschneier/django-storages/"; 75 homepage = "https://django-storages.readthedocs.io"; 76 license = lib.licenses.bsd3; 77 maintainers = with lib.maintainers; [ mmai ]; 78 }; 79}