vscode-extensions.capatech.betacode: init at 0.1.10 (#355720)
[NixPkgs.git] / pkgs / servers / matrix-synapse / plugins / s3-storage-provider.nix
blobba85de7aba2f1cd3f332cd3912fd9a04ca710392
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.5.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-Nv8NkzOcUDX17N7Lyx/NT1vXztiRNaTYIAWNPHxgxJ4=";
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 = [ ];
60   };