unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Albers via Guix-patches via <guix-patches@gnu.org>
To: 50578@debbugs.gnu.org
Cc: Thomas Albers <thomas@thomaslabs.org>
Subject: [bug#50578] [PATCH] gnu: Add minipro
Date: Mon,  3 Apr 2023 15:17:29 +0200	[thread overview]
Message-ID: <20230403131729.3437-1-thomas@thomaslabs.org> (raw)
In-Reply-To: <20210914105601.12562-1-thomas@thomaslabs.org>

* gnu/packages/electronics.scm (minipro): New variable.
---
 gnu/packages/electronics.scm | 59 ++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 98b71e041e..e1ceabd583 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Thomas Albers Raviola <thomas@thomaslabs.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -431,3 +432,61 @@ (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
+        #~(list (string-append "VERSION=" #$version)
+                (string-append "PREFIX=" #$output)
+                (string-append "UDEV_DIR=" #$output "/lib/udev")
+                (string-append "COMPLETIONS_DIR=" #$output
+                               "/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+))))
-- 
2.39.2





  parent reply	other threads:[~2023-04-03 13:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 10:56 [bug#50578] [PATCH] gnu: Add minipro Thomas Albers via Guix-patches via
2023-03-31 11:09 ` Bruno Victal
2023-04-01 15:41   ` Thomas Albers Raviola via Guix-patches via
2023-04-01 17:46     ` Bruno Victal
2023-04-02 22:13       ` Thomas Albers Raviola via Guix-patches via
2023-04-03 11:17         ` Bruno Victal
2023-04-03 13:20           ` Thomas Albers Raviola via Guix-patches via
2023-04-02 22:08 ` Thomas Albers via Guix-patches via
2023-04-03 13:17 ` Thomas Albers via Guix-patches via [this message]
2023-04-22 12:48   ` Bruno Victal
2023-04-23 15:24   ` bug#50578: " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230403131729.3437-1-thomas@thomaslabs.org \
    --to=guix-patches@gnu.org \
    --cc=50578@debbugs.gnu.org \
    --cc=thomas@thomaslabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).