From 77dc7ef908142a11d507c034e33edc1112be7187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 25 Apr 2020 11:03:30 +0100 Subject: [PATCH 1/3] wireguard-tools: reference tests --- .../networking/wireguard-tools/default.nix | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index 0a86d7dec8f9..82e74f1a4fdc 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -1,12 +1,12 @@ -{ - stdenv, fetchzip, - - iptables ? null, - iproute ? null, - makeWrapper ? null, - openresolv ? null, - procps ? null, - wireguard-go ? null, +{ stdenv +, fetchzip +, nixosTests +, iptables ? null +, iproute ? null +, makeWrapper ? null +, openresolv ? null +, procps ? null +, wireguard-go ? null }: with stdenv.lib; @@ -47,7 +47,12 @@ stdenv.mkDerivation rec { done ''; - passthru.updateScript = ./update.sh; + passthru = { + updateScript = ./update.sh; + tests = { + inherit (nixosTests) wg-quick wireguard-generated wireguard-namespaces; + }; + }; meta = { description = "Tools for the WireGuard secure network tunnel"; From 21ec1f5eadc5f6ca8b0b6599eda3dcf59629f1f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 25 Apr 2020 07:19:26 +0100 Subject: [PATCH 2/3] wireguard: 1.0.20200401 -> 1.0.20200413 --- pkgs/os-specific/linux/wireguard/default.nix | 28 +++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix index 890c774081bb..6edbb1aa4d7b 100644 --- a/pkgs/os-specific/linux/wireguard/default.nix +++ b/pkgs/os-specific/linux/wireguard/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchzip, kernel, perl, wireguard-tools }: +{ stdenv, fetchzip, kernel, perl, wireguard-tools, bc }: # module requires Linux >= 3.10 https://www.wireguard.io/install/#kernel-requirements assert stdenv.lib.versionAtLeast kernel.version "3.10"; @@ -7,29 +7,31 @@ assert stdenv.lib.versionOlder kernel.version "5.6"; stdenv.mkDerivation rec { pname = "wireguard"; - version = "1.0.20200401"; + version = "1.0.20200413"; src = fetchzip { url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz"; - sha256 = "1q4gfpbvbyracnl219xqfz5yqfc08i6g41z6bn2skx5x8jbll3aq"; + sha256 = "11dpw1inszbc3qjcfnap74kgjxkyyrx90vxv6wmsgkbp8lsl4p66"; }; - preConfigure = '' - cd src - sed -i '/depmod/,+1d' Makefile - ''; - hardeningDisable = [ "pic" ]; KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; - INSTALL_MOD_PATH = "\${out}"; - NIX_CFLAGS = ["-Wno-error=cpp"]; - - nativeBuildInputs = [ perl ] ++ kernel.moduleBuildDependencies; + nativeBuildInputs = [ perl bc ] ++ kernel.moduleBuildDependencies; + preBuild = "cd src"; buildFlags = [ "module" ]; - installTargets = [ "module-install" ]; + + INSTALL_MOD_PATH = placeholder "out"; + installFlags = [ "DEPMOD=true" ]; + enableParallelBuilding = true; + + passthru = { + # remove this when our kernel comes with native wireguard support + # and our tests no longer tests this package + inherit (wireguard-tools) tests; + }; meta = with stdenv.lib; { inherit (wireguard-tools.meta) homepage license maintainers; From a4347f2b9248b28880e3d724b4a4301116f3e22a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Apr 2020 20:22:14 +0200 Subject: [PATCH 3/3] wireguard: reference missing `nixosTests.wireguard` --- pkgs/tools/networking/wireguard-tools/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/networking/wireguard-tools/default.nix b/pkgs/tools/networking/wireguard-tools/default.nix index 82e74f1a4fdc..4fac72f7d035 100644 --- a/pkgs/tools/networking/wireguard-tools/default.nix +++ b/pkgs/tools/networking/wireguard-tools/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { passthru = { updateScript = ./update.sh; tests = { - inherit (nixosTests) wg-quick wireguard-generated wireguard-namespaces; + inherit (nixosTests) wireguard wg-quick wireguard-generated wireguard-namespaces; }; };