mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 09:03:42 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
63 lines
1.6 KiB
Nix
63 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchzip,
|
|
kernel,
|
|
perl,
|
|
wireguard-tools,
|
|
bc,
|
|
}:
|
|
|
|
# wireguard upstreamed since 5.6 https://lists.zx2c4.com/pipermail/wireguard/2019-December/004704.html
|
|
assert lib.versionOlder kernel.version "5.6";
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "wireguard";
|
|
version = "1.0.20220627";
|
|
|
|
src = fetchzip {
|
|
url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz";
|
|
sha256 = "sha256-skbho3e49lZ/GLp/JDQpf/yXIEjes86aYtw/dn6e0Uo=";
|
|
};
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
|
|
nativeBuildInputs = [
|
|
perl
|
|
bc
|
|
] ++ kernel.moduleBuildDependencies;
|
|
|
|
preBuild = "cd src";
|
|
buildFlags = [ "module" ];
|
|
makeFlags =
|
|
[
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
|
]
|
|
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
];
|
|
|
|
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 lib; {
|
|
inherit (wireguard-tools.meta) homepage license maintainers;
|
|
description = "Kernel module for the WireGuard secure network tunnel";
|
|
longDescription = ''
|
|
Backport of WireGuard for kernels 3.10 to 5.5, as an out of tree module.
|
|
(as WireGuard was merged into the Linux kernel for 5.6)
|
|
'';
|
|
downloadPage = "https://git.zx2c4.com/wireguard-linux-compat/refs/";
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|