From ca9e76e6766d6f678208be49ee19def61e297c2e Mon Sep 17 00:00:00 2001 From: Reno Reckling Date: Sat, 29 Dec 2018 16:41:04 +0100 Subject: [PATCH] wireguard-tools Add proper dependencies wg-quick calls iproute, resolvconf and sysctl on Linux. These dependencies where missing. --- pkgs/tools/networking/wireguard-tools/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index 07b75737a355..fcb2025f15d6 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchzip, libmnl ? null, makeWrapper ? null, wireguard-go ? null }: +{ stdenv, fetchzip, openresolv ? null, libmnl ? null, procps ? null, iproute ? null, makeWrapper ? null, wireguard-go ? null }: with stdenv.lib; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sourceRoot = "source/src/tools"; - nativeBuildInputs = optional stdenv.isDarwin makeWrapper; + nativeBuildInputs = [ makeWrapper ]; buildInputs = optional stdenv.isLinux libmnl; makeFlags = [ @@ -27,6 +27,10 @@ stdenv.mkDerivation rec { postFixup = '' substituteInPlace $out/lib/systemd/system/wg-quick@.service \ --replace /usr/bin $out/bin + '' + optionalString stdenv.isLinux '' + for f in $out/bin/*; do + wrapProgram $f --prefix PATH : ${makeBinPath [procps iproute openresolv]} + done '' + optionalString stdenv.isDarwin '' for f in $out/bin/*; do wrapProgram $f --prefix PATH : ${wireguard-go}/bin