From a71af661d3a7c5e70834f4c1c63f6be884bb002f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 15 Mar 2021 02:42:37 +0100 Subject: [PATCH] wireguard-tools: remove ? null from inputs, remove with lib; --- .../networking/wireguard-tools/default.nix | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index 687c9d988fbf..efb5b5c5b428 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -1,16 +1,15 @@ -{ lib, stdenv +{ lib +, stdenv , fetchzip , nixosTests -, iptables ? null -, iproute ? null -, makeWrapper ? null -, openresolv ? null -, procps ? null -, wireguard-go ? null +, iptables +, iproute +, makeWrapper +, openresolv +, procps +, wireguard-go }: -with lib; - stdenv.mkDerivation rec { pname = "wireguard-tools"; version = "1.0.20210315"; @@ -37,11 +36,11 @@ stdenv.mkDerivation rec { postFixup = '' substituteInPlace $out/lib/systemd/system/wg-quick@.service \ --replace /usr/bin $out/bin - '' + optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.isLinux '' for f in $out/bin/*; do - wrapProgram $f --prefix PATH : ${makeBinPath [procps iproute iptables openresolv]} + wrapProgram $f --prefix PATH : ${lib.makeBinPath [ procps iproute iptables openresolv ]} done - '' + optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' for f in $out/bin/*; do wrapProgram $f --prefix PATH : ${wireguard-go}/bin done @@ -52,7 +51,7 @@ stdenv.mkDerivation rec { tests = nixosTests.wireguard; }; - meta = { + meta = with lib; { description = "Tools for the WireGuard secure network tunnel"; downloadPage = "https://git.zx2c4.com/wireguard-tools/refs/"; homepage = "https://www.wireguard.com/";