From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcdnr-0001YC-44 for guix-patches@gnu.org; Tue, 01 Aug 2017 16:30:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcdnn-0002Ge-45 for guix-patches@gnu.org; Tue, 01 Aug 2017 16:30:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcdnn-0002G8-0b for guix-patches@gnu.org; Tue, 01 Aug 2017 16:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcdnm-0002A8-QE for guix-patches@gnu.org; Tue, 01 Aug 2017 16:30:02 -0400 Subject: [bug#27912] add libnl3 Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcdnN-0001VW-Dt for guix-patches@gnu.org; Tue, 01 Aug 2017 16:29:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcdnJ-0001rz-Cy for guix-patches@gnu.org; Tue, 01 Aug 2017 16:29:37 -0400 Received: from clarity.mcc.ac.uk ([130.88.200.144]:48652) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcdnJ-0001rG-4C for guix-patches@gnu.org; Tue, 01 Aug 2017 16:29:33 -0400 Received: from asmtp2.its.manchester.ac.uk ([130.88.13.150]) by clarity.mcc.ac.uk with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1dcdnH-000CM8-81 for guix-patches@gnu.org; Tue, 01 Aug 2017 21:29:31 +0100 Received: from albion.it.manchester.ac.uk ([130.88.138.79]:55206 helo=i-ulialbion.it.manchester.ac.uk) by asmtp2.its.manchester.ac.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1dcdnG-0001DV-Uz for guix-patches@gnu.org; Tue, 01 Aug 2017 21:29:30 +0100 From: Dave Love Date: Tue, 01 Aug 2017 21:29:30 +0100 Message-ID: <87y3r3821h.fsf@i-ulialbion.it.manchester.ac.uk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pipeline-Islam-Abduganievich-Karimov-EBS-SAR-underground" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27912@debbugs.gnu.org --pipeline-Islam-Abduganievich-Karimov-EBS-SAR-underground Content-Type: text/plain This is the first step in openfabrics support. I've also done libibverbs, but need to check that. Let me know if someone else is working on openfabrics. --pipeline-Islam-Abduganievich-Karimov-EBS-SAR-underground Content-Type: text/x-diff Content-Disposition: attachment; filename=0052-gnu-Add-libnl3.patch >From 8eb82c832622761e9a50a860f33addc3c15caf13 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Tue, 01 Aug 2017 21:22:26 +0100 Subject: [PATCH 52/69] gnu: Add libnl3. * gnu/packages/linux.scm (libnl3): New variable. --- gnu/packages/linux.scm | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 93a6a583a..6914e60a8 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4195,3 +4195,78 @@ tool, to understand the type of environment a process runs in, and for comparing system environments.") (home-page "http://github.com/jamesodhunt/procenv/") (license license:gpl3+))) + +;; Fixme: Is this the right way/a good way to deal with the Python bits? +(define-public libnl3 + (begin + (use-modules (gnu packages swig)) + (package + (name "libnl3") + (version "3.3.0") + (build-system gnu-build-system) + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/thom311/libnl/releases/download/libnl" + (string-join (string-split version #\.) "_") + "/libnl-" version ".tar.gz")) + (sha256 + (base32 "1r3lw3hjvqxi5zqyq2w1qadm3gisd9nlf71dkl4yplacmssnhm3h")))) + (native-inputs + `(("flex" ,flex) + ("bison" ,bison) + ("python-2" ,python-2) + ("python-3" ,python-3) + ("swig" ,swig) + ("pkg-config" ,pkg-config) + ("libnl3-doc" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/thom311/libnl/releases/download/libnl" + (string-join (string-split version #\.) "_") + "/libnl-doc-" version ".tar.gz")) + (sha256 + (base32 "0srab805yj8wb13l64qjyp3mdbqapxg5vk46v3zlhhzpmxqw8j7r")))))) + (outputs '("out")) + (arguments + `(#:configure-flags + `(,(format #f "LDFLAGS=-Wl,-rpath=~a/lib" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-python + (let ((out (assoc-ref %outputs "out"))) + (lambda* (#:key outputs #:allow-other-keys) + (define (python-inst python) + (let ((ldflags (format #f "LDFLAGS=-Wl,-rpath=~a/lib" out))) + (and + ;; The rpm spec quoth "build twice, otherwise capi.py is + ;; not copied to the build directory" + (zero? (system (format #f "~a ~a setup.py build" + ldflags python out))) + (zero? + (system (format #f "~a ~a setup.py install --prefix=~a" + ldflags python out))) + (zero? (system* python "setup.py" "clean"))))) + (with-directory-excursion "./python" + (for-each python-inst '("python2" "python3")))))) + (add-after 'install 'install-doc + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((dest (format #f "~a/share/doc" + (assoc-ref outputs "doc")))) + (mkdir-p dest) + (with-directory-excursion dest + (and + (zero? (system* "tar" "xf" (assoc-ref inputs "libnl3-doc"))) + (zero? (system "mv *libnl-doc* libnl3")))))))))) + (home-page "http://www.infradead.org/~tgr/libnl/") + (synopsis "Convenience library for Linux netlink sockets") + (description + "The libnl suite is a collection of libraries providing APIs to netlink +protocol based Linux kernel interfaces. + +Netlink is an IPC mechanism primarly between the kernel and user space +processes. It was designed to be a more flexible successor to ioctl to +provide mainly networking related kernel configuration and monitoring +interfaces.") + (license license:lgpl2.1)))) -- 2.11.0 --pipeline-Islam-Abduganievich-Karimov-EBS-SAR-underground--