wireguard: split module and tools (#16883)
This commit is contained in:
parent
5630ac1d92
commit
c6f99a3a92
@ -1,7 +1,8 @@
|
|||||||
{ stdenv, fetchgit, libmnl, kernel }:
|
{ stdenv, fetchgit, libmnl, kernel ? null }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
name = "wireguard-${version}";
|
name = "wireguard-${version}";
|
||||||
|
|
||||||
version = "20160708";
|
version = "20160708";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
@ -10,25 +11,45 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1ciyjpp8c3fv95y1cypk9qyqynp8cqyh2676afq2hd33110d37ni";
|
sha256 = "1ciyjpp8c3fv95y1cypk9qyqynp8cqyh2676afq2hd33110d37ni";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
cd src
|
|
||||||
sed -i /depmod/d Makefile
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ libmnl ];
|
|
||||||
|
|
||||||
KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
||||||
|
|
||||||
makeFlags = [
|
|
||||||
"DESTDIR=$(out)"
|
|
||||||
"PREFIX=/"
|
|
||||||
"INSTALL_MOD_PATH=$(out)"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.wireguard.io/;
|
homepage = https://www.wireguard.io/;
|
||||||
description = "Fast, modern, secure VPN tunnel";
|
description = "Fast, modern, secure VPN tunnel";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
module = stdenv.mkDerivation {
|
||||||
|
inherit src meta name;
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
cd src
|
||||||
|
sed -i '/depmod/,+1d' Makefile
|
||||||
|
'';
|
||||||
|
|
||||||
|
KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
||||||
|
INSTALL_MOD_PATH = "\${out}";
|
||||||
|
|
||||||
|
buildPhase = "make module";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
tools = stdenv.mkDerivation {
|
||||||
|
inherit src meta name;
|
||||||
|
|
||||||
|
preConfigure = "cd src";
|
||||||
|
|
||||||
|
buildInputs = [ libmnl ];
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"DESTDIR=$(out)"
|
||||||
|
"PREFIX=/"
|
||||||
|
"-C" "tools"
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = "make tools";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
in if kernel == null
|
||||||
|
then tools
|
||||||
|
else module
|
||||||
|
@ -11132,7 +11132,7 @@ in
|
|||||||
|
|
||||||
virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { };
|
virtualboxGuestAdditions = callPackage ../applications/virtualization/virtualbox/guest-additions { };
|
||||||
|
|
||||||
wireguard = callPackage ../os-specific/linux/wireguard {};
|
wireguard = callPackage ../os-specific/linux/wireguard { };
|
||||||
|
|
||||||
x86_energy_perf_policy = callPackage ../os-specific/linux/x86_energy_perf_policy { };
|
x86_energy_perf_policy = callPackage ../os-specific/linux/x86_energy_perf_policy { };
|
||||||
|
|
||||||
@ -14911,6 +14911,8 @@ in
|
|||||||
|
|
||||||
wings = callPackage ../applications/graphics/wings { };
|
wings = callPackage ../applications/graphics/wings { };
|
||||||
|
|
||||||
|
wireguard = callPackage ../os-specific/linux/wireguard { };
|
||||||
|
|
||||||
wmname = callPackage ../applications/misc/wmname { };
|
wmname = callPackage ../applications/misc/wmname { };
|
||||||
|
|
||||||
wmctrl = callPackage ../tools/X11/wmctrl { };
|
wmctrl = callPackage ../tools/X11/wmctrl { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user