GNU bug report logs - #62941
[PATCH 0/3] gnu: fritzing: Improve package style.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Tue, 18 Apr 2023 20:10:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 62941 in the body.
You can then email your comments to 62941 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#62941; Package guix-patches. (Tue, 18 Apr 2023 20:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 18 Apr 2023 20:10:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 0/3] gnu: fritzing: Improve package style.
Date: Tue, 18 Apr 2023 21:09:34 +0100
This patch series continue adjustment of packages where qtserialport is in use
to make the future rename to qtserialport-5 and introduce qtserialport based
on Qt6 easer.

I've move parts into dedicated package and use it as native inputs during
configure phase. With gentle touch I've checked whether use-modules has no
duplicates and sort them alphabetically to soothe the future maintenance.

Sharlatan Hellseher (3):
  gnu: Add fritzing-parts.
  gnu: fritzing: Improve package style.
  gnu: Sort use-module alphabetically in (gnu packages engineering)

 gnu/packages/engineering.scm | 173 +++++++++++++++++++++--------------
 1 file changed, 106 insertions(+), 67 deletions(-)


base-commit: 50dd91bc30634c75c0001cfd38bbcc2fbbeb894e
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62941; Package guix-patches. (Tue, 18 Apr 2023 20:21:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62941 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 1/3] gnu: Add fritzing-parts.
Date: Tue, 18 Apr 2023 21:19:58 +0100
* gnu/packages/engineering.scm (fritzing-parts): New variable.
---
 gnu/packages/engineering.scm | 38 ++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 49a12f70be..dd8a711566 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -66,6 +66,7 @@ (define-module (gnu packages engineering)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
@@ -775,6 +776,43 @@ (define-public fritzing
     ;; released under GPLv3+.
     (license (list license:gpl3+ license:cc-by-sa3.0))))
 
+(define-public fritzing-parts
+  ;; XXX: Release of the parts stopped in 2016 and it looks like develop
+  ;; branch has latest changes comparing to other branches.
+  (let ((commit "d61d63de9294343b1b6e86f149e78e4b1d3a0009")
+        (revision "0"))
+    (package
+      (name "fritzing-parts")
+      (version (git-version "0.9.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/fritzing/fritzing-parts")
+               (commit commit)))
+         (file-name (git-file-name "fritzing-parts" version))
+         (sha256
+          (base32 "0g39ja1aqw5qx8alf61m6zcy6y78j9ky556x6x1cnd6g7kkzd861"))))
+      (build-system copy-build-system)
+      (arguments
+       (list
+        #:install-plan
+        #~'(("." "share/library/"
+             #:exclude-regexp (".github.*"
+                               ".gitignore"
+                               "CONTRIBUTING.md"
+                               "LICENSE.txt"
+                               "README.md")))
+        #:modules '(((guix build gnu-build-system) #:prefix gnu:)
+                    (guix build copy-build-system)
+                    (guix build utils)
+                    (ice-9 match))))
+      (home-page "https://fritzing.org")
+      (synopsis "Electronic components (parts library) for use in the Fritzing app")
+      (description "This package contains all part definitions that are
+required for Fritzing app.")
+      (license license:cc-by-sa3.0))))
+
 (define-public qelectrotech
   (package
     (name "qelectrotech")
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62941; Package guix-patches. (Tue, 18 Apr 2023 20:21:02 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62941 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 3/3] gnu: Sort use-module alphabetically in (gnu packages
 engineering)
Date: Tue, 18 Apr 2023 21:20:00 +0100
* gnu/packages/engineering.scm: Sort use-module alphabetically to ease maintenance.
---
 gnu/packages/engineering.scm | 40 ++++++++++++++++++++----------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 67e72b58a3..85177d2c7c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -37,6 +37,7 @@
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022, 2023 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis <at> gmail.com>
+;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,15 +55,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages engineering)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix gexp)
-  #:use-module (guix git-download)
-  #:use-module (guix svn-download)
-  #:use-module (guix monads)
-  #:use-module (guix store)
-  #:use-module (guix utils)
-  #:use-module ((srfi srfi-1) #:hide (zip))
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
@@ -73,6 +65,14 @@ (define-module (gnu packages engineering)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
   #:use-module (guix build-system qt)
+  #:use-module (guix download)
+  #:use-module (guix gexp)
+  #:use-module (guix git-download)
+  #:use-module (guix monads)
+  #:use-module (guix packages)
+  #:use-module (guix store)
+  #:use-module (guix svn-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
@@ -90,7 +90,6 @@ (define-module (gnu packages engineering)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
-  #:use-module (gnu packages gawk)
   #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages digest)
   #:use-module (gnu packages docbook)
@@ -100,6 +99,7 @@ (define-module (gnu packages engineering)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages geo)
@@ -123,11 +123,12 @@ (define-module (gnu packages engineering)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages lisp)
   #:use-module (gnu packages m4)
-  #:use-module (gnu packages maths)
   #:use-module (gnu packages man)
-  #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages openkinect)
   #:use-module (gnu packages parallel)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
@@ -150,19 +151,19 @@ (define-module (gnu packages engineering)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
+  #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages text-editors)
-  #:use-module (gnu packages tree-sitter)
   #:use-module (gnu packages tls)
-  #:use-module (gnu packages tex)
+  #:use-module (gnu packages tree-sitter)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages wxwidgets)
-  #:use-module (gnu packages xml)
-  #:use-module (gnu packages xiph)
-  #:use-module (gnu packages openkinect)
   #:use-module (gnu packages xdisorg)
-  #:use-module (gnu packages xorg))
+  #:use-module (gnu packages xiph)
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg)
+  #:use-module ((srfi srfi-1) #:hide (zip)))
 
 (define-public librecad
   (package
@@ -745,6 +746,9 @@ (define-public fritzing
               (substitute* "src/version/partschecker.cpp"
                 ((".*git_libgit2_init.*")
                  "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
+              ;; XXX: NixOS and Gento have a phase where they generate part
+              ;; SQLite library, have proper investigation if it's required in
+              ;; Guix as well.
               (invoke "qmake"
                       (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," #$output "/lib")
                       (string-append "PREFIX=" #$output)
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62941; Package guix-patches. (Tue, 18 Apr 2023 20:21:03 GMT) Full text and rfc822 format available.

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

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 62941 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH 2/3] gnu: fritzing: Improve package style.
Date: Tue, 18 Apr 2023 21:19:59 +0100
* gnu/package/engineering.scm (fritzing): Improve package style.
  Use Gexp.
  [inputs]: Remove labels. Sort alphabetically.
  [native-inputs]: Introduce it, use fritzing-parts instead local source.
---
 gnu/packages/engineering.scm | 95 +++++++++++++++++-------------------
 1 file changed, 46 insertions(+), 49 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index dd8a711566..67e72b58a3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -711,58 +711,55 @@ (define-public fritzing
   (package
     (name "fritzing")
     (version "0.9.6")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/fritzing/fritzing-app")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/fritzing/fritzing-app")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (copy-recursively (assoc-ref inputs "fritzing-parts-db")
-                               "parts")
-             ;; Use system libgit2 and boost.
-             (substitute* "phoenix.pro"
-               (("^LIBGIT_STATIC.*")
-                (string-append "LIBGIT2INCLUDE=" (assoc-ref inputs "libgit2") "/include\n"
-                               "LIBGIT2LIB=" (assoc-ref inputs "libgit2") "/lib\n"
-                               "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
-                               "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
-               (("^.*pri/libgit2detect.pri.") ""))
-             ;; Trick the internal mechanism to load the parts
-             (substitute* "src/version/partschecker.cpp"
-               ((".*git_libgit2_init.*")
-                "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
-
-             (let ((out (assoc-ref outputs "out")))
-               (invoke "qmake"
-                       (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
-                       (string-append "PREFIX=" out)
-                       "phoenix.pro")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda _
+              ;; Integrate parts library
+              (copy-recursively
+               (string-append #$(this-package-native-input "fritzing-parts")
+                              "/share/library")
+               "parts")
+              ;; Use system libgit2 and boost.
+              (substitute* "phoenix.pro"
+                (("^LIBGIT_STATIC.*")
+                 (string-append
+                  "LIBGIT2INCLUDE=" #$(this-package-input "libgit2") "/include\n"
+                  "LIBGIT2LIB=" #$(this-package-input "libgit2") "/lib\n"
+                  "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
+                  "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
+                (("^.*pri/libgit2detect.pri.") ""))
+              ;; Trick the internal mechanism to load the parts
+              (substitute* "src/version/partschecker.cpp"
+                ((".*git_libgit2_init.*")
+                 "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
+              (invoke "qmake"
+                      (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," #$output "/lib")
+                      (string-append "PREFIX=" #$output)
+                      "phoenix.pro"))))))
+    (native-inputs
+     (list fritzing-parts))
     (inputs
-     `(("qtbase" ,qtbase-5)
-       ("qtserialport" ,qtserialport)
-       ("qtsvg-5" ,qtsvg-5)
-       ("libgit2" ,libgit2)
-       ("boost" ,boost)
-       ("zlib" ,zlib)
-       ("fritzing-parts-db"
-        ,(origin
-           (method git-fetch)
-           (uri (git-reference
-                 (url "https://github.com/fritzing/fritzing-parts")
-                 (commit (string-append "release_" version))))
-           (file-name (git-file-name "fritzing-parts" version))
-           (sha256
-            (base32
-             "0wsvn57v6n0ygnhk2my94rrfzb962z1cj4d1xmp1farwck3811h6"))))))
+     (list boost
+           libgit2
+           qtbase-5
+           ;; TODO: Needs to be renamed to qtserialport-5. when version 6 is
+           ;; packed.
+           qtserialport
+           qtsvg-5
+           zlib))
     (home-page "https://fritzing.org")
     (synopsis "Electronic circuit design")
     (description
-- 
2.39.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Thu, 10 Aug 2023 22:47:02 GMT) Full text and rfc822 format available.

Notification sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
bug acknowledged by developer. (Thu, 10 Aug 2023 22:47:02 GMT) Full text and rfc822 format available.

Message #19 received at 62941-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Cc: 62941-done <at> debbugs.gnu.org
Subject: Re: bug#62941: [PATCH 0/3] gnu: fritzing: Improve package style.
Date: Fri, 11 Aug 2023 00:46:23 +0200
Hi,

Sharlatan Hellseher <sharlatanus <at> gmail.com> skribis:

> This patch series continue adjustment of packages where qtserialport is in use
> to make the future rename to qtserialport-5 and introduce qtserialport based
> on Qt6 easer.
>
> I've move parts into dedicated package and use it as native inputs during
> configure phase. With gentle touch I've checked whether use-modules has no
> duplicates and sort them alphabetically to soothe the future maintenance.
>
> Sharlatan Hellseher (3):
>   gnu: Add fritzing-parts.
>   gnu: fritzing: Improve package style.
>   gnu: Sort use-module alphabetically in (gnu packages engineering)

It took a while, but it’s finally applied, thanks!

Ludo’.




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

This bug report was last modified 222 days ago.

Previous Next


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