GNU bug report logs - #50578
[PATCH] gnu: Add minipro

Previous Next

Package: guix-patches;

Reported by: Thomas Albers <thomas <at> thomaslabs.org>

Date: Tue, 14 Sep 2021 10:58:01 UTC

Severity: normal

Tags: patch

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50578 in the body.
You can then email your comments to 50578 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Tue, 14 Sep 2021 10:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Albers <thomas <at> thomaslabs.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 14 Sep 2021 10:58:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Albers <thomas <at> thomaslabs.org>
To: guix-patches <at> gnu.org
Cc: Thomas Albers <thomas <at> thomaslabs.org>
Subject: [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 <at> lassieur.org>
 ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
+;;; Copyright © 2021 Thomas Albers Raviola <thomas <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Fri, 31 Mar 2023 11:15:01 GMT) Full text and rfc822 format available.

Message #8 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Thomas Albers <thomas <at> thomaslabs.org>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Fri, 31 Mar 2023 12:09:00 +0100
Hi Thomas,

On 2021-09-14 11:56, Thomas Albers via Guix-patches via wrote:
> ---
>  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 <at> lassieur.org>
>  ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
>  ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
> +;;; Copyright © 2021 Thomas Albers Raviola <thomas <at> 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)))))

Upstream has released 0.6 in the meantime, so these fixes will have to be checked if
they're still needed. In case they are, this part will have to be rewritten with G-Expressions.
The dependencies should be restyled as well.


I know this a very late reply, but could you send a revised patch for this? (in case you're still maintaining it locally)

Thanks,
Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Sat, 01 Apr 2023 15:42:01 GMT) Full text and rfc822 format available.

Message #11 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Albers Raviola <thomas <at> thomaslabs.org>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Sat, 01 Apr 2023 17:41:23 +0200
Hi Bruno,

yes, I am still maintaining a local copy of this package.

I have a question regarding your observations though. Could you please
reference some example in the guix source base, how one is supposed to
rewrite the fixes as a G-Expression in this context?

I am not familiar with this specific use. Also the manual does not show
something similar AFAIK.

Regards,

Thomas

Bruno Victal <mirai <at> makinata.eu> writes:

> Hi Thomas,
>
> On 2021-09-14 11:56, Thomas Albers via Guix-patches via wrote:
>> ---
>>  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 <at> lassieur.org>
>>  ;;; Copyright © 2021 Efraim Flashner <efraim <at> flashner.co.il>
>>  ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
>> +;;; Copyright © 2021 Thomas Albers Raviola <thomas <at> 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)))))
>
> Upstream has released 0.6 in the meantime, so these fixes will have to be checked if
> they're still needed. In case they are, this part will have to be rewritten with G-Expressions.
> The dependencies should be restyled as well.
>
>
> I know this a very late reply, but could you send a revised patch for this? (in case you're still maintaining it locally)
>
> Thanks,
> Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Sat, 01 Apr 2023 17:47:01 GMT) Full text and rfc822 format available.

Message #14 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Thomas Albers Raviola <thomas <at> thomaslabs.org>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Sat, 1 Apr 2023 18:46:36 +0100
On 2023-04-01 16:41, Thomas Albers Raviola via Guix-patches via wrote:
> Hi Bruno,
> 
> yes, I am still maintaining a local copy of this package.
> 
> I have a question regarding your observations though. Could you please
> reference some example in the guix source base, how one is supposed to
> rewrite the fixes as a G-Expression in this context?

I've edited mympd, libavif, autokey, rng-tools, dropwatch and nvme-cli to use
G-Expressions but you can also take a look at other packages for inspiration.

Another source of inspiration is to grep for commits that perform conversion
to G-Expressions.

> I am not familiar with this specific use. Also the manual does not show
> something similar AFAIK.

Right, it's a bit unfortunate in this department at the moment.


Cheers,
Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Sun, 02 Apr 2023 22:10:01 GMT) Full text and rfc822 format available.

Message #17 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Albers <thomas <at> thomaslabs.org>
To: 50578 <at> debbugs.gnu.org
Cc: Thomas Albers <thomas <at> thomaslabs.org>
Subject: [PATCH] gnu: Add minipro
Date: Mon,  3 Apr 2023 00:08:31 +0200
* 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 <efraim <at> flashner.co.il>
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2023 Thomas Albers Raviola <thomas <at> thomaslabs.org>
 ;;;
 ;;; 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+))))
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Sun, 02 Apr 2023 22:15:02 GMT) Full text and rfc822 format available.

Message #20 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Albers Raviola <thomas <at> thomaslabs.org>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Mon, 03 Apr 2023 00:13:52 +0200
Hi Bruno,

I have sent a new patch with the new dependencies and G-Expressions. The
fix for the Makefile is still needed.

I fail to see the purpose of G-Expressions over normal backticks for the
build phases as no file-like or package is being used inside of them. I
am missing something?

Cheers,
Thomas




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Mon, 03 Apr 2023 11:25:02 GMT) Full text and rfc822 format available.

Message #23 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Thomas Albers Raviola <thomas <at> thomaslabs.org>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Mon, 3 Apr 2023 12:17:10 +0100
On 2023-04-02 23:13, Thomas Albers Raviola via Guix-patches via wrote:
> 
> I fail to see the purpose of G-Expressions over normal backticks for the
> build phases as no file-like or package is being used inside of them. I
> am missing something?

They allow for a separation between host and build code.
There's a post at <https://guix.gnu.org/blog/2021/the-big-change/> and
a chapter in the manual which explains them in further detail.

One bonus point is that for outputs, instead of writing:

--8<---------------cut here---------------start------------->8---
#~(let ((out (assoc-ref %outputs "out")))
    (list (string-append "VERSION=" #$version)
          (string-append "PREFIX=" out)
--8<---------------cut here---------------end--------------->8---

you can directly write this without the assoc-ref machinery:

--8<---------------cut here---------------start------------->8---
#~(list (string-append "VERSION=" #$version)
        (string-append "PREFIX=" #$output)
--8<---------------cut here---------------end--------------->8---


HTH!


Cheers,
Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Mon, 03 Apr 2023 13:18:02 GMT) Full text and rfc822 format available.

Message #26 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Albers <thomas <at> thomaslabs.org>
To: 50578 <at> debbugs.gnu.org
Cc: Thomas Albers <thomas <at> thomaslabs.org>
Subject: [PATCH] gnu: Add minipro
Date: Mon,  3 Apr 2023 15:17:29 +0200
* 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 <at> flashner.co.il>
 ;;; Copyright © 2021 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2023 Thomas Albers Raviola <thomas <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Mon, 03 Apr 2023 13:21:02 GMT) Full text and rfc822 format available.

Message #29 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Thomas Albers Raviola <thomas <at> thomaslabs.org>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Mon, 03 Apr 2023 15:20:10 +0200
Thanks, this does indeed help. I've send a last patch removing
assoc-ref.

Cheers,
Thomas




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Sat, 22 Apr 2023 12:49:01 GMT) Full text and rfc822 format available.

Message #32 received at 50578 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Thomas Albers <thomas <at> thomaslabs.org>
Cc: 50578 <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Sat, 22 Apr 2023 13:48:03 +0100
LGTM, I've tested this patch locally and it detected my TLC866CS without issue.
Thanks for your hard work!


Cheers,
Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#50578; Package guix-patches. (Sun, 23 Apr 2023 15:25:03 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Thomas Albers via Guix-patches via <guix-patches <at> gnu.org>
Cc: Thomas Albers <thomas <at> thomaslabs.org>, 50578-done <at> debbugs.gnu.org
Subject: Re: [bug#50578] [PATCH] gnu: Add minipro
Date: Sun, 23 Apr 2023 11:24:28 -0400
On Mon, Apr 03, 2023 at 03:17:29PM +0200, Thomas Albers via Guix-patches via wrote:
> * gnu/packages/electronics.scm (minipro): New variable.

Thanks! Pushed as ff9a60f68f174c76fdeb38bec6010327f81b9861




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Sun, 23 Apr 2023 15:25:03 GMT) Full text and rfc822 format available.

Notification sent to Thomas Albers <thomas <at> thomaslabs.org>:
bug acknowledged by developer. (Sun, 23 Apr 2023 15:25:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 22 May 2023 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.