wireguard-tools: remove ? null from inputs, remove with lib;

This commit is contained in:
Sandro Jäckel 2021-03-15 02:42:37 +01:00
parent ec5be00b37
commit a71af661d3
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1,16 +1,15 @@
{ lib, stdenv { lib
, stdenv
, fetchzip , fetchzip
, nixosTests , nixosTests
, iptables ? null , iptables
, iproute ? null , iproute
, makeWrapper ? null , makeWrapper
, openresolv ? null , openresolv
, procps ? null , procps
, wireguard-go ? null , wireguard-go
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "wireguard-tools"; pname = "wireguard-tools";
version = "1.0.20210315"; version = "1.0.20210315";
@ -37,11 +36,11 @@ stdenv.mkDerivation rec {
postFixup = '' postFixup = ''
substituteInPlace $out/lib/systemd/system/wg-quick@.service \ substituteInPlace $out/lib/systemd/system/wg-quick@.service \
--replace /usr/bin $out/bin --replace /usr/bin $out/bin
'' + optionalString stdenv.isLinux '' '' + lib.optionalString stdenv.isLinux ''
for f in $out/bin/*; do 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 done
'' + optionalString stdenv.isDarwin '' '' + lib.optionalString stdenv.isDarwin ''
for f in $out/bin/*; do for f in $out/bin/*; do
wrapProgram $f --prefix PATH : ${wireguard-go}/bin wrapProgram $f --prefix PATH : ${wireguard-go}/bin
done done
@ -52,7 +51,7 @@ stdenv.mkDerivation rec {
tests = nixosTests.wireguard; tests = nixosTests.wireguard;
}; };
meta = { meta = with lib; {
description = "Tools for the WireGuard secure network tunnel"; description = "Tools for the WireGuard secure network tunnel";
downloadPage = "https://git.zx2c4.com/wireguard-tools/refs/"; downloadPage = "https://git.zx2c4.com/wireguard-tools/refs/";
homepage = "https://www.wireguard.com/"; homepage = "https://www.wireguard.com/";