From patchwork Sun Apr 20 16:47:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rutherther X-Patchwork-Id: 41830 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 E364C27BC4B; Sun, 20 Apr 2025 17:48:22 +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 E069E27BC49 for ; Sun, 20 Apr 2025 17:48:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u6Xps-0003g8-T8; Sun, 20 Apr 2025 12:48:04 -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 1u6Xpr-0003fd-8b for guix-patches@gnu.org; Sun, 20 Apr 2025 12:48: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 1u6Xpq-0004E1-VK for guix-patches@gnu.org; Sun, 20 Apr 2025 12:48:02 -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:References:In-Reply-To:Date:From:To:Subject; bh=1qGWolNqP+G6sjOpl0SAZj3jWLQSbfj6ro9YlEVyPi0=; b=RmbB6tCvuTe328mt8eDHvu7BJaB2K0M7bccYC3bzUt0nHe3XAwwJiJRcYBjJCC2qC/R3KGT2911G9kH4fe629XlCPN1zUS8mq7gJTXgBjGtXBqAthfceY5LOeei7mBg8u2vYQErIAXXk4C7bedL4YmFsKQFUUXDVZk+zvTOH+rj3otUWqG9XcpF+kfxv6acYTV5b9EA2lfpQOnMJgIqjsBOa1HTCWRCbWzbQDpiXssY6b+05Lf/msNip6Z4snAZVj2HBt7A48Gx7+FIN1yeN8YGS1N7T7RLc9o44OLjvpiLg/e8ArGE2KCk3EiaTdqZYRAdr4MmB7Ky/znBUDxKlWw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u6Xpq-0001xf-Qq; Sun, 20 Apr 2025 12:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77927] [PATCH v3 1/4] gnu: Add libiio Resent-From: Rutherther Original-Sender: "Debbugs-submit" Resent-CC: rutherther@ditigal.xyz, glv@posteo.net, guix-patches@gnu.org Resent-Date: Sun, 20 Apr 2025 16:48: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 , Rutherther , Guillaume Le Vaillant X-Debbugs-Original-Xcc: Rutherther , Guillaume Le Vaillant Received: via spool by 77927-submit@debbugs.gnu.org id=B77927.17451676717475 (code B ref 77927); Sun, 20 Apr 2025 16:48:02 +0000 Received: (at 77927) by debbugs.gnu.org; 20 Apr 2025 16:47:51 +0000 Received: from localhost ([127.0.0.1]:51900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6Xpf-0001wT-1c for submit@debbugs.gnu.org; Sun, 20 Apr 2025 12:47:51 -0400 Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:46754 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 1u6XpS-0001t2-0H for 77927@debbugs.gnu.org; Sun, 20 Apr 2025 12:47:39 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id 8291dced (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sun, 20 Apr 2025 16:47:31 +0000 (UTC) Date: Sun, 20 Apr 2025 18:47:18 +0200 Message-ID: <0ddebef4bfce7c9902f29f395296374240a95ac4.1745167600.git.rutherther@ditigal.xyz> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: 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=1745167651; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=gEa3mekkE5MzfyfrxNlaFs2LVoYKy0JI5yHhrEy7tg4=; b=oUY7tkxNvWMFGUkE8WWwcuIEXxv/uAxvhbFlmP85LGnvKUm1rncqK1/fCvaS/On5O/3Bg UdRj1S0LXPk0/WfXn7UwDqBDrh25h1vcZ1brOAE+ZtHrSprLpRNUbsw3beKe5tq8pOsHaFq 1zWL+xpwxlWqe2177b2+QejCvgxZe64= 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 | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm index 2752380a3a..283b69bfd7 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,74 @@ (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 "-DPKG_CONFIG_EXECUTABLE=" + (search-input-file %build-inputs + (string-append "/bin/" #$(pkg-config-for-target)))) + (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)) + (inputs + (list + avahi + libaio + 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")