12 stdenv.mkDerivation rec {
13 pname = "wireguard-tools";
14 version = "1.0.20210914";
17 url = "https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${version}.tar.xz";
18 sha256 = "sha256-eGGkTVdPPTWK6iEyowW11F4ywRhd+0IXJTZCqY3OZws=";
21 outputs = [ "out" "man" ];
23 sourceRoot = "source/src";
25 nativeBuildInputs = [ makeWrapper ];
30 "WITH_BASHCOMPLETION=yes"
31 "WITH_SYSTEMDUNITS=yes"
36 substituteInPlace $out/lib/systemd/system/wg-quick@.service \
37 --replace /usr/bin $out/bin
38 '' + lib.optionalString stdenv.isLinux ''
39 for f in $out/bin/*; do
40 # allow users to provide their own resolvconf implementation, e.g. the one provided by systemd-resolved
42 --prefix PATH : ${lib.makeBinPath [ procps iproute2 iptables ]} \
43 --suffix PATH : ${lib.makeBinPath [ openresolv ]}
48 updateScript = ./update.sh;
49 tests = nixosTests.wireguard;
53 description = "Tools for the WireGuard secure network tunnel";
55 Supplies the main userspace tooling for using and configuring WireGuard tunnels, including the wg(8) and wg-quick(8) utilities.
56 - wg : the configuration utility for getting and setting the configuration of WireGuard tunnel interfaces. The interfaces
57 themselves can be added and removed using ip-link(8) and their IP addresses and routing tables can be set using ip-address(8)
58 and ip-route(8). The wg utility provides a series of sub-commands for changing WireGuard-specific aspects of WireGuard interfaces.
59 - wg-quick : an extremely simple script for easily bringing up a WireGuard interface, suitable for a few common use cases.
61 downloadPage = "https://git.zx2c4.com/wireguard-tools/refs/";
62 homepage = "https://www.wireguard.com/";
63 license = licenses.gpl2;
64 maintainers = with maintainers; [ ericsagnes zx2c4 globin ma27 d-xo ];
65 platforms = platforms.unix;