Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / matrix-synapse / plugins / s3-storage-provider.nix
blob386849f17896c2f1f39a221993df7b75335c7daa
1 { lib
2 , boto3
3 , buildPythonPackage
4 , fetchFromGitHub
5 , humanize
6 , matrix-synapse-unwrapped
7 , pythonOlder
8 , tqdm
9 , twisted
10 , psycopg2
13 buildPythonPackage rec {
14   pname = "matrix-synapse-s3-storage-provider";
15   version = "1.4.0";
16   format = "setuptools";
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "matrix-org";
22     repo = "synapse-s3-storage-provider";
23     rev = "refs/tags/v${version}";
24     hash = "sha256-LOkSsgxHoABiiVtqssBaWYUroQBzzaJ3SclYcEMm2Mk=";
25   };
27   postPatch = ''
28     substituteInPlace setup.py \
29       --replace "humanize>=0.5.1,<0.6" "humanize>=0.5.1"
30   '';
32   buildInputs = [
33     matrix-synapse-unwrapped
34   ];
36   propagatedBuildInputs = [
37     boto3
38     humanize
39     tqdm
40     twisted
41     psycopg2
42   ]
43   # For the s3_media_upload script
44   ++ matrix-synapse-unwrapped.propagatedBuildInputs;
46   # Tests need network access
47   doCheck = false;
49   pythonImportsCheck = [
50     "s3_storage_provider"
51   ];
53   meta = with lib; {
54     description = "Synapse storage provider to fetch and store media in Amazon S3";
55     mainProgram = "s3_media_upload";
56     homepage = "https://github.com/matrix-org/synapse-s3-storage-provider";
57     changelog = "https://github.com/matrix-org/synapse-s3-storage-provider/releases/tag/v${version}";
58     license = licenses.asl20;
59     maintainers = with maintainers; [ ];
60   };