summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2017-09-17 13:40:20 +0000
committerGitHub <noreply@github.com>2017-09-17 13:40:20 +0000
commit149307476e055f1a6c13212b3ad9569bf6299bea (patch)
treed8ed07700750d40b365d6fc9aea113583742a526 /nixos
parent8a09e51dc2b04b2ad30fb2a360eef075103a346e (diff)
parent8cea87c1eb10fef013dbcea3d1fcb938b6ee5a8f (diff)
downloadnixlib-149307476e055f1a6c13212b3ad9569bf6299bea.tar
nixlib-149307476e055f1a6c13212b3ad9569bf6299bea.tar.gz
nixlib-149307476e055f1a6c13212b3ad9569bf6299bea.tar.bz2
nixlib-149307476e055f1a6c13212b3ad9569bf6299bea.tar.lz
nixlib-149307476e055f1a6c13212b3ad9569bf6299bea.tar.xz
nixlib-149307476e055f1a6c13212b3ad9569bf6299bea.tar.zst
nixlib-149307476e055f1a6c13212b3ad9569bf6299bea.zip
Merge pull request #29479 from florianjacob/fix-tinc-stable
nixos/tinc: Fix tinc cli wrapper for tinc 1.0
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/tinc.nix6
1 files 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)}
         '';
       };