matrix-synapse: Prune deps, add missing deps, expose extras
Drops extra arguments on the package, as they will be moved over into the module in a more discoverable way next. Also reduces overly broad `with`-scoping.
This commit is contained in:
parent
446b09fd3d
commit
fd429f5bac
@ -1,7 +1,12 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, python3, openssl, cargo, rustPlatform, rustc
|
{ lib
|
||||||
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform python3.pkgs.systemd
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python3
|
||||||
|
, openssl
|
||||||
|
, cargo
|
||||||
|
, rustPlatform
|
||||||
|
, rustc
|
||||||
, nixosTests
|
, nixosTests
|
||||||
, enableRedis ? true
|
|
||||||
, callPackage
|
, callPackage
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -9,8 +14,7 @@ let
|
|||||||
plugins = python3.pkgs.callPackage ./plugins { };
|
plugins = python3.pkgs.callPackage ./plugins { };
|
||||||
tools = callPackage ./tools { };
|
tools = callPackage ./tools { };
|
||||||
in
|
in
|
||||||
with python3.pkgs;
|
python3.pkgs.buildPythonApplication rec {
|
||||||
buildPythonApplication rec {
|
|
||||||
pname = "matrix-synapse";
|
pname = "matrix-synapse";
|
||||||
version = "1.87.0";
|
version = "1.87.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
@ -34,7 +38,7 @@ buildPythonApplication rec {
|
|||||||
sed -i '/^setuptools_rust =/d' pyproject.toml
|
sed -i '/^setuptools_rust =/d' pyproject.toml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = with python3.pkgs; [
|
||||||
poetry-core
|
poetry-core
|
||||||
rustPlatform.cargoSetupHook
|
rustPlatform.cargoSetupHook
|
||||||
setuptools-rust
|
setuptools-rust
|
||||||
@ -42,47 +46,90 @@ buildPythonApplication rec {
|
|||||||
rustc
|
rustc
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
authlib
|
attrs
|
||||||
bcrypt
|
bcrypt
|
||||||
bleach
|
bleach
|
||||||
canonicaljson
|
canonicaljson
|
||||||
daemonize
|
cryptography
|
||||||
ijson
|
ijson
|
||||||
immutabledict
|
immutabledict
|
||||||
jinja2
|
jinja2
|
||||||
jsonschema
|
jsonschema
|
||||||
lxml
|
|
||||||
matrix-common
|
matrix-common
|
||||||
msgpack
|
msgpack
|
||||||
netaddr
|
netaddr
|
||||||
|
packaging
|
||||||
phonenumbers
|
phonenumbers
|
||||||
pillow
|
pillow
|
||||||
prometheus-client
|
prometheus-client
|
||||||
psutil
|
|
||||||
psycopg2
|
|
||||||
pyasn1
|
pyasn1
|
||||||
|
pyasn1-modules
|
||||||
pydantic
|
pydantic
|
||||||
pyicu
|
|
||||||
pymacaroons
|
pymacaroons
|
||||||
pynacl
|
|
||||||
pyopenssl
|
pyopenssl
|
||||||
pysaml2
|
|
||||||
pyyaml
|
pyyaml
|
||||||
requests
|
service-identity
|
||||||
setuptools
|
|
||||||
signedjson
|
signedjson
|
||||||
sortedcontainers
|
sortedcontainers
|
||||||
treq
|
treq
|
||||||
twisted
|
twisted
|
||||||
typing-extensions
|
typing-extensions
|
||||||
unpaddedbase64
|
unpaddedbase64
|
||||||
] ++ lib.optional enableSystemd systemd
|
]
|
||||||
++ lib.optionals enableRedis [ hiredis txredisapi ];
|
++ twisted.optional-dependencies.tls;
|
||||||
|
|
||||||
nativeCheckInputs = [ mock parameterized openssl ];
|
passthru.optional-dependencies = with python3.pkgs; {
|
||||||
|
postgres = if isPyPy then [
|
||||||
|
psycopg2cffi
|
||||||
|
] else [
|
||||||
|
psycopg2
|
||||||
|
];
|
||||||
|
saml2 = [
|
||||||
|
pysaml2
|
||||||
|
];
|
||||||
|
oidc = [
|
||||||
|
authlib
|
||||||
|
];
|
||||||
|
systemd = [
|
||||||
|
systemd
|
||||||
|
];
|
||||||
|
url-preview = [
|
||||||
|
lxml
|
||||||
|
];
|
||||||
|
sentry = [
|
||||||
|
sentry-sdk
|
||||||
|
];
|
||||||
|
opentracing = [
|
||||||
|
jaeger-client
|
||||||
|
opentracing
|
||||||
|
];
|
||||||
|
jwt = [
|
||||||
|
authlib
|
||||||
|
];
|
||||||
|
redis = [
|
||||||
|
hiredis
|
||||||
|
txredisapi
|
||||||
|
];
|
||||||
|
cache-memory = [
|
||||||
|
pympler
|
||||||
|
];
|
||||||
|
user-search = [
|
||||||
|
pyicu
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
openssl
|
||||||
|
] ++ (with python3.pkgs; [
|
||||||
|
mock
|
||||||
|
parameterized
|
||||||
|
])
|
||||||
|
++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||||
|
|
||||||
doCheck = !stdenv.isDarwin;
|
doCheck = !stdenv.isDarwin;
|
||||||
|
|
||||||
@ -112,6 +159,7 @@ buildPythonApplication rec {
|
|||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://matrix.org";
|
homepage = "https://matrix.org";
|
||||||
|
changelog = "https://github.com/matrix-org/synapse/releases/tag/v${version}";
|
||||||
description = "Matrix reference homeserver";
|
description = "Matrix reference homeserver";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = teams.matrix.members;
|
maintainers = teams.matrix.members;
|
||||||
|
Loading…
Reference in New Issue
Block a user