13 stdenv.mkDerivation rec {
14 pname = "wireguard-tools";
15 version = "1.0.20210424";
18 url = "https://git.zx2c4.com/wireguard-tools/snapshot/wireguard-tools-${version}.tar.xz";
19 sha256 = "sha256-0aGaE4EBb4wb5g32Wugakt7w41sb97Hqqkac7qE641M=";
22 outputs = [ "out" "man" ];
24 sourceRoot = "source/src";
26 nativeBuildInputs = [ makeWrapper ];
31 "WITH_BASHCOMPLETION=yes"
32 "WITH_SYSTEMDUNITS=yes"
37 substituteInPlace $out/lib/systemd/system/wg-quick@.service \
38 --replace /usr/bin $out/bin
39 '' + lib.optionalString stdenv.isLinux ''
40 for f in $out/bin/*; do
41 wrapProgram $f --prefix PATH : ${lib.makeBinPath [ procps iproute2 iptables openresolv ]}
43 '' + lib.optionalString stdenv.isDarwin ''
44 for f in $out/bin/*; do
45 wrapProgram $f --prefix PATH : ${wireguard-go}/bin
50 updateScript = ./update.sh;
51 tests = nixosTests.wireguard;
55 description = "Tools for the WireGuard secure network tunnel";
56 downloadPage = "https://git.zx2c4.com/wireguard-tools/refs/";
57 homepage = "https://www.wireguard.com/";
58 license = licenses.gpl2;
59 maintainers = with maintainers; [ elseym ericsagnes mic92 zx2c4 globin ma27 xwvvvvwx ];
60 platforms = platforms.unix;