From patchwork Sun Apr 20 16:18:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rutherther X-Patchwork-Id: 41826 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1BE9A27BC4B; Sun, 20 Apr 2025 17:19:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 13A0727BC49 for ; Sun, 20 Apr 2025 17:19:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u6XNr-00068x-VY; Sun, 20 Apr 2025 12:19:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u6XNn-00068j-JM for guix-patches@gnu.org; Sun, 20 Apr 2025 12:19:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u6XNn-0001OM-Aa for guix-patches@gnu.org; Sun, 20 Apr 2025 12:19:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=ohknnTPSB/E3z4j3qpB5vpQR07vpdaqN5Vo2hTrw30g=; b=CFYhyN3amthAb9zf72H3D5CTyZx3DcHBxSEV4SqKwVwrGffPjBJPLoG8cEn4FVOQ/fj6uURvqXNDIvC6NrXESOnEdrL16WY8HjTYSS3rW5XBn7ibkhLwUE2yZTa1RxQDKFcFOuzdMkiZq7GX5xKvghOhNCE9Pj9s7TpBmCuJ56UtgU9X1+dAmr0/yZxTWHcamu8NHIpz5wLtgoFsbLXCBEFC3pew8d7bC/V2vA/JjEuaSE6xy2bALWWM71xsXAaasKQNQvRoif+YueJdJeJmNHJKFDbD5V70G5gBFdfJuf7jcRsfcmBwSbB3zzcDUufKK+pun5hUxm7QiKYvb7vCjQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u6XNm-0007Il-3M for guix-patches@gnu.org; Sun, 20 Apr 2025 12:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77927] [PATCH v2 1/4] gnu: Add libiio References: <87r01oq91y.fsf@ditigal.xyz> In-Reply-To: <87r01oq91y.fsf@ditigal.xyz> Resent-From: Rutherther Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Apr 2025 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77927@debbugs.gnu.org Cc: Rutherther Received: via spool by 77927-submit@debbugs.gnu.org id=B77927.174516592128032 (code B ref 77927); Sun, 20 Apr 2025 16:19:02 +0000 Received: (at 77927) by debbugs.gnu.org; 20 Apr 2025 16:18:41 +0000 Received: from localhost ([127.0.0.1]:51507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6XNQ-0007I2-VO for submit@debbugs.gnu.org; Sun, 20 Apr 2025 12:18:41 -0400 Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:52702 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u6XNM-0007HR-Bp for 77927@debbugs.gnu.org; Sun, 20 Apr 2025 12:18:38 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id 538d3f03 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 20 Apr 2025 16:18:27 +0000 (UTC) Date: Sun, 20 Apr 2025 18:18:09 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1745165907; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : from; bh=LtJo4YcCUj9gK8J/dIqN1Adw9Ig0994MAvsXTeAC9CM=; b=i4WByc1/0cqB0QYRoPftBAcFuDq9OX5ZXtxvuB/k7XC6iMUlV20K+3wRp8FKEk1NPU/jh zvtbeIHTh+6R0b/AKfr0UKOy3gk6W37yRUgk/RB8QZfDy+DjEGG3QQKwNEfGWFGlfPyurRW Xjl3+ngeAJNNpYDSfgEVPLwhMGxo+U0= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Rutherther X-ACL-Warn: , Rutherther via Guix-patches X-Patchwork-Original-From: Rutherther via Guix-patches via From: Rutherther Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is a dependency used for communicating with PlutoSDR. * gnu/packages/radio.scm (libiio): New variable. Change-Id: Ic34895af35fa008923fed0de74ad12ffc75f2021 --- gnu/packages/radio.scm | 67 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) base-commit: 3ed24b2354907fd9ca4de6fa3ef0dc3015cafbca diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 2752380a3a..cf8bb6f4e5 100644 --- a/gnu/packages/radio.scm +++ b/gnu/packages/radio.scm @@ -49,6 +49,7 @@ (define-module (gnu packages radio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -56,6 +57,7 @@ (define-module (gnu packages radio) #:use-module (gnu packages databases) #:use-module (gnu packages documentation) #:use-module (gnu packages engineering) + #:use-module (gnu packages flex) #:use-module (gnu packages fltk) #:use-module (gnu packages gcc) #:use-module (gnu packages gd) @@ -190,6 +192,71 @@ (define-public libcorrect used as a drop-in substitute for @code{libfec}.") (license license:bsd-3)))) +(define-public libiio + (package + (name "libiio") + (version "0.26") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/analogdevicesinc/libiio") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "18cmaszfmn6kaa9gi26kkgjk506xqb8zsd4bq6yp8hzxr1qldfly")))) + (arguments + (list + #:tests? #f + #:configure-flags + #~(list + (string-append "-DUDEV_RULES_INSTALL_DIR=" #$output "/lib/udev/rules.d") + "-DOSX_PACKAGE=off" + "-DOSX_FRAMEWORK=off" + (string-append "-DPython_EXECUTABLE=" (search-input-file %build-inputs "/bin/python3")) + "-DPYTHON_BINDINGS=on") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + (substitute* "bindings/python/iio.py" + (("_iiolib = \"iio\"") (string-append "_iiolib = \"" #$output "/lib/libiio.so\"")) + (("find_library\\(_iiolib\\)") "_iiolib")) + ;; Libiio is not installed at the time of the build. The check is unnecessary, + ;; to do it the upstream way, we would have to configure, build, install + ;; without the bindings first, and then second time with the bindings... + (substitute* "bindings/python/setup.py.cmakein" + (("self._check_libiio_installed()") ""))))))) + (native-inputs + (list + pkg-config + flex + bison + python + avahi + libaio)) + (inputs + (list + libxml2 + libusb)) + (build-system cmake-build-system) + (license (list + license:lgpl2.1 + license:gpl2)) + (home-page "https://github.com/analogdevicesinc/libiio") + (synopsis "A cross platform library for interfacing with local and remote Linux IIO devices ") + (description + "Library for interfacing with Linux IIO devices +libiio is used to interface to the Linux Industrial Input/Output (IIO) Subsystem. +The Linux IIO subsystem is intended to provide support for devices that in some +sense are analog to digital or digital to analog converters (ADCs, DACs). +This includes, but is not limited to ADCs, Accelerometers, Gyros, IMUs, +Capacitance to Digital Converters (CDCs), Pressure Sensors, Color, Light and Proximity Sensors, +Temperature Sensors, Magnetometers, DACs, DDS (Direct Digital Synthesis), PLLs (Phase Locked Loops), +Variable/Programmable Gain Amplifiers (VGA, PGA), and RF transceivers. You can use libiio natively +on an embedded Linux target (local mode), or use libiio to communicate remotely to that same target +from a host Linux, Windows or MAC over USB or Ethernet or Serial."))) + (define-public liquid-dsp (package (name "liquid-dsp")