summary refs log tree commit diff
path: root/pkgs/os-specific/linux/crda
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-12-27 18:53:01 +0100
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-12-27 19:00:42 +0100
commitee0fae473cea2ded7d3ea59967d3c751605e9939 (patch)
tree312c8e42b1ceb8bbbcbe2f04e075d42a71170bb6 /pkgs/os-specific/linux/crda
parentb88abaaf5e6fbf525e29357732b1f28648b5bad2 (diff)
downloadnixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.tar
nixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.tar.gz
nixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.tar.bz2
nixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.tar.lz
nixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.tar.xz
nixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.tar.zst
nixpkgs-ee0fae473cea2ded7d3ea59967d3c751605e9939.zip
crda: init at 3.18
Diffstat (limited to 'pkgs/os-specific/linux/crda')
-rw-r--r--pkgs/os-specific/linux/crda/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/crda/default.nix b/pkgs/os-specific/linux/crda/default.nix
new file mode 100644
index 00000000000..542fcae562d
--- /dev/null
+++ b/pkgs/os-specific/linux/crda/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchurl, libgcrypt, libnl, pkgconfig, pythonPackages, wireless-regdb }:
+
+let version = "3.18"; in
+stdenv.mkDerivation {
+  name = "crda-${version}";
+
+  src = fetchurl {
+    sha256 = "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23";
+    url = "http://kernel.org/pub/software/network/crda/crda-${version}.tar.xz";
+  };
+
+  buildInputs = [ libgcrypt libnl ];
+  nativeBuildInputs = [
+    pkgconfig pythonPackages.m2crypto pythonPackages.python
+  ];
+
+  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 = [
+    "DESTDIR=$(out)"
+    "PREFIX="
+    "REG_BIN=${wireless-regdb}/lib/crda/regulatory.bin"
+  ];
+
+  buildFlags = [ "all_noverify" ];
+  enableParallelBuilding = true;
+
+  doCheck = true;
+  checkTarget = "verify";
+
+  meta = with stdenv.lib; {
+    inherit version;
+    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.
+      CRDA is intended to be run only through udev communication from the kernel.
+    '';
+    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;
+    maintainers = with maintainers; [ nckx ];
+  };
+}