[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50578] [PATCH] gnu: Add minipro
From: |
Thomas Albers |
Subject: |
[bug#50578] [PATCH] gnu: Add minipro |
Date: |
Tue, 14 Sep 2021 12:56:01 +0200 |
---
gnu/packages/electronics.scm | 66 ++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 0e985c9750..e6abdc6562 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2021 Thomas Albers Raviola <thomas@thomaslabs.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
@@ -333,3 +335,67 @@ from ALSA, ESD, and COMEDI sources. This package
currently does not include
support for ESD sources.")
(home-page "http://xoscope.sourceforge.net/")
(license license:gpl2+)))
+
+(define-public minipro
+ ;; Information needed to fix Makefile
+ (let* ((commit "0774b071361366c866ec97302ec02972379418b0")
+ (commit-short (substring commit 0 8))
+ ;; git show -s --format="%ci"
+ (date "2021-08-05 07:54:42 +0300")
+ (revision "1"))
+ (package
+ (name "minipro")
+ (version (git-version "0.5" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/DavidGriffith/minipro.git")
+ (commit commit)))
+ (sha256
+ (base32 "174m2dwgpxwkm1yrf54p6k5skihgpcd1iblxivg2f6xbdrsz8b18"))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("which" ,which)
+ ("sed" ,sed)))
+ (inputs
+ `(("libusb" ,libusb)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check)
+ (add-before 'build 'fix-makefile
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Modify the makefile so that its 'PREFIX' variable points to
+ ;; "out".
+ ;; Also fix the folder to where the udev rules are installed and
+ ;; some git related variables that minipro expects.
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "Makefile"
+ (("PREFIX \\?= .*")
+ (string-append "PREFIX ?= " out "\n" ))
+ (("UDEV_DIR=.*")
+ (string-append "UDEV_DIR=" out "/lib/udev/\n"))
+ (("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"))))
+ #t)))))
+ (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.33.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#50578] [PATCH] gnu: Add minipro,
Thomas Albers <=