diff options
author | Yureka <yuka@yuka.dev> | 2023-07-31 19:16:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-31 19:16:07 +0200 |
commit | 021692865a0e1fbce7d32be7f289f2041299bd31 (patch) | |
tree | a3f876f2bf7ef2594abcb0bf4aa57d4242344b74 /pkgs/servers/matrix-synapse/plugins | |
parent | de000582ac4966a21faa5ceb39bac5b14fdcaea6 (diff) |
matrix-synapse.plugins.matrix-synapse-s3-storage-provider: init at 1.2.1 (#229192)
Diffstat (limited to 'pkgs/servers/matrix-synapse/plugins')
-rw-r--r-- | pkgs/servers/matrix-synapse/plugins/default.nix | 1 | ||||
-rw-r--r-- | pkgs/servers/matrix-synapse/plugins/s3-storage-provider.nix | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/matrix-synapse/plugins/default.nix b/pkgs/servers/matrix-synapse/plugins/default.nix index 7c77bf933c5c0..1f35ae0502411 100644 --- a/pkgs/servers/matrix-synapse/plugins/default.nix +++ b/pkgs/servers/matrix-synapse/plugins/default.nix @@ -5,5 +5,6 @@ matrix-synapse-ldap3 = callPackage ./ldap3.nix { }; matrix-synapse-mjolnir-antispam = callPackage ./mjolnir-antispam.nix { }; matrix-synapse-pam = callPackage ./pam.nix { }; + matrix-synapse-s3-storage-provider = callPackage ./s3-storage-provider.nix { }; matrix-synapse-shared-secret-auth = callPackage ./shared-secret-auth.nix { }; } diff --git a/pkgs/servers/matrix-synapse/plugins/s3-storage-provider.nix b/pkgs/servers/matrix-synapse/plugins/s3-storage-provider.nix new file mode 100644 index 0000000000000..646dfc3728d12 --- /dev/null +++ b/pkgs/servers/matrix-synapse/plugins/s3-storage-provider.nix @@ -0,0 +1,33 @@ +{ lib, buildPythonPackage, fetchFromGitHub, matrix-synapse, twisted, humanize, boto3, tqdm }: + +buildPythonPackage rec { + pname = "matrix-synapse-s3-storage-provider"; + version = "1.2.1"; + + src = fetchFromGitHub { + owner = "matrix-org"; + repo = "synapse-s3-storage-provider"; + rev = "v${version}"; + sha256 = "sha256-92Xkq54jrUE2I9uVOxI72V9imLNU6K4JqDdOZb+4f+Y="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "humanize>=0.5.1,<0.6" "humanize>=0.5.1" + ''; + + doCheck = false; + pythonImportsCheck = [ "s3_storage_provider" ]; + + buildInputs = [ matrix-synapse ]; + propagatedBuildInputs = [ twisted humanize boto3 tqdm ] + # for the s3_media_upload script + ++ matrix-synapse.propagatedBuildInputs; + + meta = with lib; { + description = "Synapse storage provider to fetch and store media in Amazon S3"; + homepage = "https://github.com/matrix-org/synapse-s3-storage-provider"; + license = licenses.asl20; + maintainers = with maintainers; [ yuka ]; + }; +} |