From 7078db04e0dc300693b4856efa28b0e8efa638d7 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Thu, 8 Jul 2021 16:13:54 -0700 Subject: [PATCH] zrepl: wrap with ssh in PATH This allows the ssh+stdinserver connection type function properly. --- pkgs/tools/backup/zrepl/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/backup/zrepl/default.nix b/pkgs/tools/backup/zrepl/default.nix index a7111633545..59dbfc0be72 100644 --- a/pkgs/tools/backup/zrepl/default.nix +++ b/pkgs/tools/backup/zrepl/default.nix @@ -1,5 +1,9 @@ -{ lib, buildGoModule, fetchFromGitHub }: - +{ lib +, buildGoModule +, fetchFromGitHub +, makeWrapper +, openssh +}: buildGoModule rec { pname = "zrepl"; version = "0.4.0"; @@ -15,10 +19,17 @@ buildGoModule rec { subPackages = [ "." ]; + nativeBuildInputs = [ + makeWrapper + ]; + postInstall = '' mkdir -p $out/lib/systemd/system substitute dist/systemd/zrepl.service $out/lib/systemd/system/zrepl.service \ --replace /usr/local/bin/zrepl $out/bin/zrepl + + wrapProgram $out/bin/zrepl \ + --prefix PATH : ${lib.makeBinPath [ openssh ]} ''; meta = with lib; {