From patchwork Wed Jun 29 14:46:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Polidoro X-Patchwork-Id: 40408 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 C033627BBEA; Wed, 29 Jun 2022 16:06:33 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 25ABB27BBE9 for ; Wed, 29 Jun 2022 16:06:33 +0100 (BST) Received: from localhost ([::1]:42744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6ZGy-0003A1-Ax for patchwork@mira.cbaines.net; Wed, 29 Jun 2022 11:06:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6ZGX-0002uP-Uq for guix-patches@gnu.org; Wed, 29 Jun 2022 11:06:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6ZGU-0001cm-MU for guix-patches@gnu.org; Wed, 29 Jun 2022 11:06:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o6ZGU-0003l0-I3 for guix-patches@gnu.org; Wed, 29 Jun 2022 11:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56298] [PATCH 7/7] gnu: Add python-cmsis-pack-manager. Resent-From: peter@polidoro.io Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Jun 2022 15:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56298 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 56298@debbugs.gnu.org Cc: Peter Polidoro Received: via spool by 56298-submit@debbugs.gnu.org id=B56298.165651510414319 (code B ref 56298); Wed, 29 Jun 2022 15:06:02 +0000 Received: (at 56298) by debbugs.gnu.org; 29 Jun 2022 15:05:04 +0000 Received: from localhost ([127.0.0.1]:59806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6ZFX-0003is-PZ for submit@debbugs.gnu.org; Wed, 29 Jun 2022 11:05:04 -0400 Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]:26680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6ZFU-0003iH-Mp for 56298@debbugs.gnu.org; Wed, 29 Jun 2022 11:05:01 -0400 X-Sender-Id: dreamhost|x-authsender|peter@polidoro.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 11B7C76140D; Wed, 29 Jun 2022 14:46:50 +0000 (UTC) Received: from pdx1-sub0-mail-a203.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 87F14762AD4; Wed, 29 Jun 2022 14:46:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1656514009; a=rsa-sha256; cv=none; b=IVJ6A0u67ZcwU/HQm74/evmqNwptotG7XBFky9ReH5SRF1by0WS9KgoNNNV6xIJjufaFWO cUar/+qNeC+9kk9U51DLJaVMpK4TCWnw0pKGDFTtMFsNBJ5vS8aRCwv0JX/qhXD7RrDbXt X5flhLqaBLXjImpsgnOkkPHWFQoTR/TrXAT1z7pqrrprpHyv4qX/Ua9utrte6y3rzfVOOo 4wRLPgM7nxxCAsjbZEhcuGI7jtfmRo3SJoRylv6nuqY0hipOOhvuPa3nuVyxeDxqHVNNsS d7KsXoPoQlhnXTBKCZOuvbklw9XFOMNyyyxUaT4lznypKdUrQQwADkCCIakaHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1656514009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PNudVdOe1lGv/YFRGyaWMyzrVS3pK7w+flkva0EbjAs=; b=DHj44SIFLj80z4512+fTz7xwnQim0mIO/iaDSH22V/9xSkUE+5wZRfld14KD11hIVAoj7A FW0RCxeaPmAcdsRjJibiqhRE9JhfNctles7tU0ufBB7zS0vJFr2f39xFgicBpQppo5QpZr jYN628PyUo8+6uPS27lVnxecVggAB40xqPKxnNaYg9tu7qQTujIUv6vO3KGKZBdUYx2xKK 539sACZTP8S3duDnQmlOuB/OQceKsNyZfp+cLrBneeLcX2TOaU19pm+1GbB/urnhBK5s68 6SmiSdNGMrhdbE6aLeWLF6TUS8nGc5YAYKxOyYbABBhTy0hnzyOlHELSkjxY5Q== ARC-Authentication-Results: i=1; rspamd-689699966c-2htcb; auth=pass smtp.auth=dreamhost smtp.mailfrom=peter@polidoro.io X-Sender-Id: dreamhost|x-authsender|peter@polidoro.io X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|peter@polidoro.io X-MailChannels-Auth-Id: dreamhost X-Lyrical-Thread: 0dab4e7a02432503_1656514009833_3534013906 X-MC-Loop-Signature: 1656514009833:132768317 X-MC-Ingress-Time: 1656514009833 Received: from pdx1-sub0-mail-a203.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.106.91 (trex/6.7.1); Wed, 29 Jun 2022 14:46:49 +0000 Received: from knave.hhmi.org (unknown [206.241.0.254]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: peter@polidoro.io) by pdx1-sub0-mail-a203.dreamhost.com (Postfix) with ESMTPSA id 4LY46c4Q66zDX; Wed, 29 Jun 2022 07:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polidoro.io; s=dreamhost; t=1656514008; bh=PNudVdOe1lGv/YFRGyaWMyzrVS3pK7w+flkva0EbjAs=; h=From:To:Cc:Subject:Date:Content-Type:Content-Transfer-Encoding; b=kIpsAy7oURbFa63xbYU2xgTUSi70pCyUdpT7LculruVhnFpzPWxFZIx5a6Xsyuk6K xl6H5uJWFd4DtYytVU8m4oBcy3es5DJY8yFqS+827Ta58Me5bblrSs7Grr/gj8rFUK HE/Nj0sgG4nnU7CTy0ypIM4qLX1A5Tdg+23I8S7iyy2aTi3aw27FasAFbUS8il4qxd tVqO9m7Qnccc5pBUmasLFyysC/n5GxH4IKdfQ/xPUvw5Vl+HIAocf4i91b4JaPusMZ RubhaUHxF8huDEdOOr7iPMTcdjp4AePcC9QKlQaqCWjFbhbowHSfVlsYzdNA/j4TQy J7gRy+gco5dUQ== From: peter@polidoro.io Date: Wed, 29 Jun 2022 10:46:33 -0400 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Peter Polidoro * gnu/packages/embedded.scm (python-cmsis-pack-manager): New variable. --- gnu/packages/embedded.scm | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 6a66fe4753..07087b0feb 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2021 Morgan Smith ;;; Copyright © 2022 Mathieu Othacehe ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022 Peter Polidoro ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,6 +36,7 @@ (define-module (gnu packages embedded) #:use-module (guix svn-download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -48,6 +50,7 @@ (define-module (gnu packages embedded) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages crates-io) #:use-module (gnu packages cross-base) #:use-module (gnu packages dejagnu) #:use-module (gnu packages flex) @@ -65,6 +68,7 @@ (define-module (gnu packages embedded) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) + #:use-module (gnu packages rust) #:use-module (gnu packages swig) #:use-module (gnu packages texinfo) #:use-module (gnu packages version-control) @@ -1580,6 +1584,83 @@ (define-public python-psptool (description "PSPTool is a tool for dealing with AMD binary blobs") (license license:gpl3+))) +(define-public python-cmsis-pack-manager + (package + (name "python-cmsis-pack-manager") + (version "0.4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pyocd/cmsis-pack-manager") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0gv8qnk4qfffa6pshm85jh5wi4rf2pfrxn2jdj8wa19adzdwnwag")))) + (build-system python-build-system) + (arguments + (list + #:imported-modules (append %cargo-build-system-modules + %python-build-system-modules) + #:modules `(((guix build cargo-build-system) #:prefix cargo:) + ,@%python-build-system-modules + (srfi srfi-1) + (ice-9 match)) + ;; #:phases + ;; #~(modify-phases (@ (guix build python-build-system) %standard-phases) + ;; (add-before 'build 'configure-cargo + ;; (lambda* (#:key inputs #:allow-other-keys) + ;; ;; Hide irrelevant inputs from cargo-build-system so it does + ;; ;; not try to unpack sanity-check.py, etc. + ;; (let ((cargo-inputs (filter (match-lambda + ;; ((name . path) + ;; (or (string-prefix? "rust-" name) + ;; (string=? "gcc" name)))) + ;; inputs))) + ;; (with-directory-excursion "rust" + ;; ((assoc-ref cargo:%standard-phases 'unpack-rust-crates) + ;; #:inputs cargo-inputs + ;; #:vendor-dir "guix-vendor") + ;; ((assoc-ref cargo:%standard-phases 'configure) + ;; #:inputs cargo-inputs) + ;; ((assoc-ref cargo:%standard-phases 'patch-cargo-checksums) + ;; #:vendor-dir "guix-vendor")) + ;; (rename-file "rust/.cargo" ".cargo")))) + ;; (replace 'check + ;; (lambda* (#:key tests? #:allow-other-keys) + ;; (when tests? + ;; (invoke "pytest" "-vv" "tests")))) + ;; ) + )) + (inputs (list rust-anyhow-1 + rust-bytes-1 + rust-futures-0.3 + rust-log-0.4 + rust-loom-0.5 + rust-minidom-0.12 + rust-reqwest-0.11 + rust-rustc-demangle-0.1 + rust-serde-1 + rust-serde-json-1 + rust-tokio-1)) + (propagated-inputs (list python-appdirs + python-milksnake + python-pyyaml)) + (native-inputs (list python-hypothesis + python-jinja2 + python-mock + python-pytest + rust + `(,rust "cargo"))) + (home-page "https://github.com/pyocd/cmsis-pack-manager") + (synopsis + "Python manager for CMSIS-Pack index and cache with Rust backend") + (description + "This package provides a python module, Rust crate, and command line utility +for managing current device information that is stored in many Common +Microcontroller Software Interface Standard (CMSIS) Packs.") + (license license:asl2.0))) + (define-public agent-proxy (let ((commit "8927798a71d246871ea8fc22b4512296a3fa1765") (revision "0"))