summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-17 12:14:48 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-17 15:35:57 +0200
commitcc205dac76d29e3affc5630623de9591789e4411 (patch)
tree687fce979ba1412819484b4b972b8c5a122ee6e8 /gnu
parentc80b4a3e831edaa7273dbeaf623a0f47cb0079af (diff)
gnu: Add CRDA.
* gnu/packages/linux.scm (crda): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/linux.scm69
1 files changed, 69 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 59909e91e18..1280599490e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1704,6 +1704,75 @@ interface.")
1704 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html") 1704 (home-page "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html")
1705 (license gpl2+))) 1705 (license gpl2+)))
1706 1706
1707(define-public crda
1708 (package
1709 (name "crda")
1710 (version "3.18")
1711 (source (origin
1712 (method url-fetch)
1713 (uri (string-append "mirror://kernel.org/software/network/crda/"
1714 "crda-" version ".tar.xz"))
1715 (sha256
1716 (base32
1717 "1gydiqgb08d9gbx4l6gv98zg3pljc984m50hmn3ysxcbkxkvkz23"))
1718 (patches (list (search-patch "crda-optional-gcrypt.patch")))))
1719 (build-system gnu-build-system)
1720 (arguments
1721 '(#:phases (modify-phases %standard-phases
1722 (delete 'configure)
1723 (add-before
1724 'build 'no-werror-no-ldconfig
1725 (lambda _
1726 (substitute* "Makefile"
1727 (("-Werror") "")
1728 (("ldconfig") "true"))
1729 #t))
1730 (add-before
1731 'build 'set-regulator-db-file-name
1732 (lambda* (#:key inputs #:allow-other-keys)
1733 ;; Tell CRDA where to find our database.
1734 (let ((regdb (assoc-ref inputs "wireless-regdb")))
1735 (substitute* "crda.c"
1736 (("\"/lib/crda/regulatory.bin\"")
1737 (string-append "\"" regdb
1738 "/lib/crda/regulatory.bin\"")))
1739 #t))))
1740 #:test-target "verify"
1741 #:make-flags (let ((out (assoc-ref %outputs "out"))
1742 (regdb (assoc-ref %build-inputs "wireless-regdb")))
1743 (list "CC=gcc" "V=1"
1744
1745 ;; Disable signature-checking on 'regulatory.bin'.
1746 ;; The reason is that this simplifies maintenance
1747 ;; on our side (no need to manage a distro key
1748 ;; pair), and we can guarantee integrity of
1749 ;; 'regulatory.bin' by other means anyway, such as
1750 ;; 'guix gc --verify'. See
1751 ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb>
1752 ;; for a discssion.
1753 "USE_OPENSSL=0"
1754
1755 (string-append "PREFIX=" out)
1756 (string-append "SBINDIR=" out "/sbin/")
1757 (string-append "UDEV_RULE_DIR="
1758 out "/lib/udev/rules.d")
1759 (string-append "LDFLAGS=-Wl,-rpath="
1760 out "/lib -L.")
1761 (string-append "REG_BIN=" regdb
1762 "/lib/crda/regulatory.bin")))))
1763 (native-inputs `(("pkg-config" ,pkg-config)
1764 ("python" ,python-2)
1765 ("wireless-regdb" ,wireless-regdb)))
1766 (inputs `(("libnl" ,libnl)))
1767 (home-page
1768 "https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA")
1769 (synopsis "Central regulatory domain agent (CRDA) for WiFi")
1770 (description
1771 "The Central Regulatory Domain Agent (CRDA) acts as the udev helper for
1772communication between the kernel Linux and user space for regulatory
1773compliance.")
1774 (license copyleft-next)))
1775
1707(define-public wireless-regdb 1776(define-public wireless-regdb
1708 (package 1777 (package
1709 (name "wireless-regdb") 1778 (name "wireless-regdb")