From 8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Sat, 16 Sep 2017 22:05:25 +0200 Subject: [PATCH] nixos/tinc: Fix tinc cli wrapper for tinc 1.0. tinc prior to 1.1 doesn't have the `tinc` executable, and `tincd` isn't of any use while the daemon already runs. --- nixos/modules/services/networking/tinc.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/tinc.nix b/nixos/modules/services/networking/tinc.nix index 7a786b54ccbb..d5db328310c1 100644 --- a/nixos/modules/services/networking/tinc.nix +++ b/nixos/modules/services/networking/tinc.nix @@ -199,8 +199,10 @@ in buildInputs = [ pkgs.makeWrapper ]; buildCommand = '' mkdir -p $out/bin - ${concatStringsSep "\n" (mapAttrsToList (network: data: '' - makeWrapper ${data.package}/bin/tinc "$out/bin/tinc.${network}" --add-flags "--pidfile=/run/tinc.${network}.pid" + ${concatStringsSep "\n" (mapAttrsToList (network: data: + optionalString (versionAtLeast data.package.version "1.1pre") '' + makeWrapper ${data.package}/bin/tinc "$out/bin/tinc.${network}" \ + --add-flags "--pidfile=/run/tinc.${network}.pid" '') cfg.networks)} ''; };