Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 74a80c5a9ab0
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a49a2fb8c10c
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 26, 2020

  1. wireguard-tools: reference tests

    (cherry picked from commit 77dc7ef)
    Mic92 authored and Ma27 committed Apr 26, 2020
    Copy the full SHA
    24cf10d View commit details
  2. wireguard: 1.0.20200401 -> 1.0.20200413

    (cherry picked from commit 21ec1f5)
    Mic92 authored and Ma27 committed Apr 26, 2020
    Copy the full SHA
    a49a2fb View commit details
Showing with 30 additions and 23 deletions.
  1. +15 −13 pkgs/os-specific/linux/wireguard/default.nix
  2. +15 −10 pkgs/tools/networking/wireguard-tools/default.nix
28 changes: 15 additions & 13 deletions pkgs/os-specific/linux/wireguard/default.nix
Original file line number Diff line number Diff line change
@@ -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;
25 changes: 15 additions & 10 deletions pkgs/tools/networking/wireguard-tools/default.nix
Original file line number Diff line number Diff line change
@@ -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) wireguard wireguard-generated wireguard-namespaces;
};
};

meta = {
description = "Tools for the WireGuard secure network tunnel";