matrix-synapse: build a pythonEnv out of extraPackages to include dependencies

By just appending site-packages to the extraPackages, you would get situations like
pysaml2 being included in pythonpath, but not its dependencies like pytz and dateutils
This commit is contained in:
Daniel Olsen 2023-12-10 03:21:27 +01:00
parent b4b49b84c9
commit a695ad5fb5

View file

@ -14,11 +14,11 @@
let
extraPackages = lib.concatMap (extra: matrix-synapse-unwrapped.optional-dependencies.${extra}) (lib.unique extras);
pluginsEnv = matrix-synapse-unwrapped.python.buildEnv.override {
extraLibs = plugins;
pythonEnv = matrix-synapse-unwrapped.python.buildEnv.override {
extraLibs = extraPackages ++ plugins;
};
searchPath = lib.makeSearchPathOutput "lib" matrix-synapse-unwrapped.python.sitePackages (extraPackages ++ [ pluginsEnv ]);
searchPath = "${pythonEnv}/${matrix-synapse-unwrapped.python.sitePackages}";
in
stdenv.mkDerivation {
name = (lib.appendToName "wrapped" matrix-synapse-unwrapped).name;