diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-05-22 17:48:29 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-05-22 17:48:29 +0300 |
commit | f9feacfc7c389bacb937e24d7cccfe013271efaa (patch) | |
tree | 264c2e15652058f1f1dc16fa4739d453c533ba58 /pkgs/tools/networking | |
parent | db4d77779c9b52a35c5a4306d36e2727cba1b162 (diff) | |
parent | c8a4562f5966e90cbbe04195b4a37a5d4a334f60 (diff) | |
download | nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.gz nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.bz2 nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.lz nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.xz nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.tar.zst nixlib-f9feacfc7c389bacb937e24d7cccfe013271efaa.zip |
Merge remote-tracking branch 'upstream/master' into staging
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r-- | pkgs/tools/networking/wireguard-go/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/networking/wireguard-tools/default.nix | 40 |
2 files changed, 23 insertions, 25 deletions
diff --git a/pkgs/tools/networking/wireguard-go/default.nix b/pkgs/tools/networking/wireguard-go/default.nix index e27b241e755d..37220acf8cf8 100644 --- a/pkgs/tools/networking/wireguard-go/default.nix +++ b/pkgs/tools/networking/wireguard-go/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { name = "wireguard-go-${version}"; - version = "0.0.20180514"; + version = "0.0.20180519"; goPackagePath = "wireguard-go"; src = fetchzip { url = "https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-${version}.tar.xz"; - sha256 = "1i1w4vj8w353b92nfhs92k0f7fifrwi067qfmgckdk0kk76nv2id"; + sha256 = "0b3wpc0ccf24567fjafv1sjs3yqq1xjam3gpfp37avxqy9789nb7"; }; goDeps = ./deps.nix; @@ -22,7 +22,7 @@ buildGoPackage rec { description = "Userspace Go implementation of WireGuard"; homepage = https://git.zx2c4.com/wireguard-go/about/; license = licenses.gpl2; - maintainers = with maintainers; [ kirelagin ]; - platforms = with platforms; linux ++ darwin ++ windows; + maintainers = with maintainers; [ kirelagin zx2c4 ]; + platforms = platforms.darwin; }; } diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index c9e48d61c359..c43e7548364e 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -1,46 +1,44 @@ -{ stdenv, lib, fetchzip, libmnl, useSystemd ? stdenv.isLinux }: +{ stdenv, fetchzip, libmnl ? null, makeWrapper ? null, wireguard-go ? null }: -let - inherit (lib) optional optionalString; -in +with stdenv.lib; stdenv.mkDerivation rec { name = "wireguard-tools-${version}"; version = "0.0.20180519"; src = fetchzip { - url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${version}.tar.xz"; + url = "https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${version}.tar.xz"; sha256 = "0pd04ia0wcm0f6di4gx5kflccc5j35d72j38l8jqpj8vinl6l070"; }; - preConfigure = "cd src"; + sourceRoot = "source/src/tools"; - buildInputs = optional stdenv.isLinux libmnl; - - enableParallelBuilding = true; + nativeBuildInputs = [ (optional stdenv.isDarwin makeWrapper) ]; + buildInputs = [ (optional stdenv.isLinux libmnl) ]; makeFlags = [ - "WITH_BASHCOMPLETION=yes" - "WITH_WGQUICK=yes" - "WITH_SYSTEMDUNITS=${if useSystemd then "yes" else "no"}" "DESTDIR=$(out)" "PREFIX=/" - "-C" "tools" + "WITH_BASHCOMPLETION=yes" + "WITH_SYSTEMDUNITS=yes" + "WITH_WGQUICK=yes" ]; - buildPhase = "make tools"; - - postInstall = optionalString useSystemd '' + postFixup = '' substituteInPlace $out/lib/systemd/system/wg-quick@.service \ --replace /usr/bin $out/bin + '' + optionalString stdenv.isDarwin '' + for f in $out/bin/*; do + wrapProgram $f --prefix PATH : ${wireguard-go}/bin + done ''; meta = with stdenv.lib; { - homepage = https://www.wireguard.com/; + description = "Tools for the WireGuard secure network tunnel"; downloadPage = https://git.zx2c4.com/WireGuard/refs/; - description = " Tools for the WireGuard secure network tunnel"; - maintainers = with maintainers; [ ericsagnes mic92 zx2c4 ]; - license = licenses.gpl2; - platforms = platforms.unix; + homepage = https://www.wireguard.com/; + license = licenses.gpl2; + maintainers = with maintainers; [ ericsagnes mic92 zx2c4 ]; + platforms = platforms.unix; }; } |