From 8281752e39b49474dee50b1a335fd06899142ff2 Mon Sep 17 00:00:00 2001 From: Florian Brandes Date: Thu, 2 Mar 2023 08:00:10 +0100 Subject: [PATCH] borgmatic: fix systemd service due to https://github.com/borgmatic-collective/borgmatic/commit/2e9f70d49647d47fb4ca05f428c592b0e4319544 there is another "sleep", which is now wrongly substituted. This fixes the error: Failed to inhibit: Invalid what specification /nix/store/if12v01xkqladifvk8yqjdpbp6sisg74-coreutils-9.1/bin/sleep:shutdown Signed-off-by: Florian Brandes --- pkgs/tools/backup/borgmatic/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/backup/borgmatic/default.nix b/pkgs/tools/backup/borgmatic/default.nix index dcc4caaa6362..db6191b4aeb7 100644 --- a/pkgs/tools/backup/borgmatic/default.nix +++ b/pkgs/tools/backup/borgmatic/default.nix @@ -34,11 +34,13 @@ python3Packages.buildPythonApplication rec { mkdir -p $out/lib/systemd/system cp sample/systemd/borgmatic.timer $out/lib/systemd/system/ + # there is another "sleep", so choose the one with the space after it + # due to https://github.com/borgmatic-collective/borgmatic/commit/2e9f70d49647d47fb4ca05f428c592b0e4319544 substitute sample/systemd/borgmatic.service \ $out/lib/systemd/system/borgmatic.service \ --replace /root/.local/bin/borgmatic $out/bin/borgmatic \ --replace systemd-inhibit ${systemd}/bin/systemd-inhibit \ - --replace sleep ${coreutils}/bin/sleep + --replace "sleep " "${coreutils}/bin/sleep " ''; passthru.tests.version = testers.testVersion { package = borgmatic; };