From 162d4bf69f2a75369e32d73ce6e0d2d2e9d6b7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 7 Sep 2022 13:43:43 +0200 Subject: [PATCH] mautrix-signal: Use `--prefix` instead of `--set` in wrapper. Otherwise, options like `systemd.services..path` have no effect. An example for this being necessary is to add `ffmpeg` to the path of a service running `mautrix-signal` in order to decode audio messages. In general, package wrappers should not make environment variables like PATH or PYTHONPATH non-overridable. --- pkgs/servers/mautrix-signal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/mautrix-signal/default.nix b/pkgs/servers/mautrix-signal/default.nix index 4879e6899517..056d2047f2d6 100644 --- a/pkgs/servers/mautrix-signal/default.nix +++ b/pkgs/servers/mautrix-signal/default.nix @@ -47,8 +47,8 @@ python3.pkgs.buildPythonPackage rec { " > $out/bin/mautrix-signal chmod +x $out/bin/mautrix-signal wrapProgram $out/bin/mautrix-signal \ - --set PATH ${python3}/bin \ - --set PYTHONPATH "$PYTHONPATH" + --prefix PATH : "${python3}/bin" \ + --prefix PYTHONPATH : "$PYTHONPATH" ''; meta = with lib; {