From patchwork Sun Apr 2 22:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Albers Raviola X-Patchwork-Id: 48951 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 6C20C1723F; Sun, 2 Apr 2023 23:10:26 +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=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,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 A96D417182 for ; Sun, 2 Apr 2023 23:10:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pj5tk-0001hV-9z; Sun, 02 Apr 2023 18:10: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 1pj5ti-0001h6-DY for guix-patches@gnu.org; Sun, 02 Apr 2023 18:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pj5ti-0006DG-0d for guix-patches@gnu.org; Sun, 02 Apr 2023 18:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pj5th-0004aM-TK for guix-patches@gnu.org; Sun, 02 Apr 2023 18:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50578] [PATCH] gnu: Add minipro References: <20210914105601.12562-1-thomas@thomaslabs.org> In-Reply-To: <20210914105601.12562-1-thomas@thomaslabs.org> Resent-From: Thomas Albers Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Apr 2023 22:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50578@debbugs.gnu.org Cc: Thomas Albers Received: via spool by 50578-submit@debbugs.gnu.org id=B50578.168047334817545 (code B ref 50578); Sun, 02 Apr 2023 22:10:01 +0000 Received: (at 50578) by debbugs.gnu.org; 2 Apr 2023 22:09:08 +0000 Received: from localhost ([127.0.0.1]:42906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pj5sp-0004Yv-HG for submit@debbugs.gnu.org; Sun, 02 Apr 2023 18:09:07 -0400 Received: from gamma.thomaslabs.org ([38.242.253.186]:54128 helo=localhost) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pj5sm-0004Yk-T2 for 50578@debbugs.gnu.org; Sun, 02 Apr 2023 18:09:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; t=1680473327; bh=VXHhGFMHaVHk9t1P0BWKzkGNxF8/Qgryzz/wiuaTIM0=; h=date:subject:cc:to: from; d=thomaslabs.org; b=FeyLKW6Bm2RPfcL6vg3asX/WasCwoUpLyAF16wZeYZDl 3qe8mci/9FyI0eu1oFszBLpYGU2qH1qPoNuTHnOMekX3+yNTFVmKyDb7HJuoZNtS44EkXt BAXgwldPUaoDFowlQlmQlG1xgQx7KFYCurd+GoeS1PBlyWGmmvMj27x9HTpz/h5HsU+2u9 DHxDMuqfqC5xlfoe2eQVNOIPYsgk3ODCnJPrUPdFIlICuKr9VJWofTeJ7eQeRVTIDSW884 Ut8fvfzPKSeoPk1CZ+VvbF5qVUJv0aT1QXjsJwr9SkVkfh7waS43GenOB3HQsDpL3RuH45 Lc9QMcQhqoNHWwm6ng== Received: from alpha.lan (dslb-088-068-101-101.088.068.pools.vodafone-ip.de [88.68.101.101]) by localhost (OpenSMTPD) with ESMTPSA id 5a4c6301 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 2 Apr 2023 22:08:47 +0000 (UTC) Date: Mon, 3 Apr 2023 00:08:31 +0200 Message-Id: <20230402220831.12216-1-thomas@thomaslabs.org> X-Mailer: git-send-email 2.39.2 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: , Reply-to: Thomas Albers X-ACL-Warn: , Thomas Albers via Guix-patches X-Patchwork-Original-From: Thomas Albers via Guix-patches via From: Thomas Albers Raviola 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 * gnu/packages/electronics.scm (minipro): New variable. --- gnu/packages/electronics.scm | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 98b71e041e..e76b90eff6 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Leo Famulari ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2023 Thomas Albers Raviola ;;; ;;; This file is part of GNU Guix. ;;; @@ -431,3 +432,62 @@ (define-public xoscope support for ESD sources.") (home-page "https://xoscope.sourceforge.net/") (license license:gpl2+))) + +(define-public minipro + ;; Information needed to fix Makefile + (let* ((commit "c181c2cf1619d00a520627d475e3fadb1eea5dac") + (commit-short (substring commit 0 8)) + (date "2022-09-10 21:44:06 -0700")) + (package + (name "minipro") + (version "0.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/DavidGriffith/minipro.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03xgmvvsxmqrz7blg7cqk0pb9ynhlq6v6jfl532zmjdzp5p3h10d")))) + (native-inputs (list pkg-config which)) + (inputs (list libusb)) + (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-before 'build 'fix-makefile + (lambda _ + ;; Fix some git related variables that minipro expects + (substitute* "Makefile" + (("GIT_BRANCH = .*") + (string-append "GIT_BRANCH = \"master\"\n")) + (("GIT_HASH = .*") + (string-append "GIT_HASH = \"" #$commit "\"\n")) + (("GIT_HASH_SHORT = .*") + (string-append "GIT_HASH_SHORT = \"" #$commit-short "\"\n")) + (("GIT_DATE = .*") + (string-append "GIT_DATE = \"" #$date "\"\n")))))) + #:make-flags + #~(let ((out (assoc-ref %outputs "out"))) + (list (string-append "VERSION=" #$version) + (string-append "PREFIX=" out) + (string-append "UDEV_DIR=" out "/lib/udev") + (string-append "COMPLETIONS_DIR=" out + "/share/bash-completion/completions"))))) + (synopsis "Controls the TL866xx series of chip programmers") + (description + "minipro is designed to program or read the contents of +chips supported by the TL866xx series of programmers. This includes many +microcontrollers, ROMs, EEPROMs and PLDs. + +To use this program without root privileges you must install the necessary udev +rules. This can be done by extending @code{udev-service-type} in your +@code{operating-system} configuration with this package. E.g.: +@code{(udev-rules-service 'minipro minipro #:groups '(\"plugdev\")}. +Additionally your user must be member of the @code{plugdev} group.") + (home-page "https://gitlab.com/DavidGriffith/minipro") + (license license:gpl3+))))