2016-10-18 15:28:20 +00:00
|
|
|
{ stdenv, fetchurl, libgcrypt, libnl, pkgconfig, python2Packages, wireless-regdb }:
|
2015-12-27 17:53:01 +00:00
|
|
|
|
2016-01-24 19:31:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "crda";
|
2016-01-24 19:31:44 +00:00
|
|
|
version = "3.18";
|
2015-12-27 17:53:01 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
sha256 = "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23";
|
|
|
|
url = "http://kernel.org/pub/software/network/crda/crda-${version}.tar.xz";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libgcrypt libnl ];
|
|
|
|
nativeBuildInputs = [
|
2016-10-18 15:28:20 +00:00
|
|
|
pkgconfig python2Packages.m2crypto python2Packages.python
|
2015-12-27 17:53:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs utils/
|
|
|
|
substituteInPlace Makefile --replace ldconfig true
|
|
|
|
sed -i crda.c \
|
|
|
|
-e "/\/usr\/.*\/regulatory.bin/d" \
|
|
|
|
-e "s|/lib/crda|${wireless-regdb}/lib/crda|g"
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
2015-12-27 19:03:47 +00:00
|
|
|
"PREFIX=$(out)"
|
|
|
|
"SBINDIR=$(out)/bin/"
|
|
|
|
"UDEV_RULE_DIR=$(out)/lib/udev/rules.d/"
|
2015-12-27 17:53:01 +00:00
|
|
|
"REG_BIN=${wireless-regdb}/lib/crda/regulatory.bin"
|
|
|
|
];
|
|
|
|
|
2017-09-01 12:37:50 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=unused-const-variable";
|
|
|
|
|
2015-12-27 17:53:01 +00:00
|
|
|
buildFlags = [ "all_noverify" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "verify";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Linux wireless Central Regulatory Domain Agent";
|
|
|
|
longDescription = ''
|
|
|
|
CRDA acts as the udev helper for communication between the kernel and
|
|
|
|
userspace for regulatory compliance. It relies on nl80211 for communication.
|
2017-03-20 22:22:28 +00:00
|
|
|
|
2015-12-27 17:53:01 +00:00
|
|
|
CRDA is intended to be run only through udev communication from the kernel.
|
2017-03-20 22:22:28 +00:00
|
|
|
To use it under NixOS, add
|
|
|
|
|
|
|
|
services.udev.packages = [ pkgs.crda ];
|
|
|
|
|
|
|
|
to the system configuration.
|
2015-12-27 17:53:01 +00:00
|
|
|
'';
|
|
|
|
homepage = http://drvbp1.linux-foundation.org/~mcgrof/rel-html/crda/;
|
|
|
|
license = licenses.free; # "copyleft-next 0.3.0", as yet without a web site
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|