[PATCH] gnu: wpa-supplicant-gui: Fix build.

  • Done
  • quality assurance status badge
Details
2 participants
  • Mathieu Othacehe
  • Timotej Lazar
Owner
unassigned
Submitted by
Timotej Lazar
Severity
normal
T
T
Timotej Lazar wrote on 10 Aug 2022 11:48
(address . guix-patches@gnu.org)(name . Timotej Lazar)(address . timotej.lazar@araneo.si)
20220810094833.26717-1-timotej.lazar@araneo.si
* gnu/packages/admin.scm (wpa-supplicant-gui)[build-system]: Use
qt-build-system.
[phases]: Use G-exps. Drop trailing #t. Don’t wrap-program as that is done by
the build system.
---
gnu/packages/admin.scm | 45 +++++++++++++++++-------------------------
1 file changed, 18 insertions(+), 27 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 146423d068..3aa65824c8 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -77,6 +77,7 @@ (define-module (gnu packages admin)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (guix build-system qt)
#:use-module (guix build-system ruby)
#:use-module (guix build-system trivial)
#:use-module (guix download)
@@ -2145,34 +2146,24 @@ (define-public wpa-supplicant-gui
;; For icons.
(modify-inputs (package-native-inputs wpa-supplicant)
(prepend imagemagick inkscape/stable)))
+ (build-system qt-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "wpa_supplicant/wpa_gui-qt4")
- #t))
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "qmake" "wpa_gui.pro")
- (invoke "make" "-j" (number->string (parallel-job-count)))
- (invoke "make" "-C" "icons")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (qt '("qtbase" "qtsvg-5")))
- (install-file "wpa_gui" (string-append out "/bin"))
- (install-file "wpa_gui.desktop"
- (string-append out "/share/applications"))
- (copy-recursively "icons/hicolor"
- (string-append out "/share/icons/hicolor"))
- (wrap-program (string-append out "/bin/wpa_gui")
- `("QT_PLUGIN_PATH" ":" prefix
- ,(map (lambda (label)
- (string-append (assoc-ref inputs label)
- "/lib/qt5/plugins/"))
- qt)))
- #t))))))
+ (list #:test-target "check"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "wpa_supplicant/wpa_gui-qt4")))
+ (replace 'configure
+ (lambda _ (invoke "qmake" "wpa_gui.pro")))
+ (add-after 'build 'build-icons
+ (lambda _ (invoke "make" "-C" "icons")))
+ (replace 'install
+ (lambda _
+ (install-file "wpa_gui" (string-append #$output "/bin"))
+ (install-file "wpa_gui.desktop"
+ (string-append #$output "/share/applications"))
+ (copy-recursively "icons/hicolor"
+ (string-append #$output "/share/icons/hicolor")))))))
(synopsis "Graphical user interface for WPA supplicant")))
(define-public hostapd
--
2.36.1
M
M
Mathieu Othacehe wrote on 11 Aug 2022 10:57
(name . Timotej Lazar)(address . timotej.lazar@araneo.si)(address . 57106@debbugs.gnu.org)
87zggb2m59.fsf@gnu.org
Toggle quote (3 lines)
> gnu/packages/admin.scm | 45 +++++++++++++++++-------------------------
> 1 file changed, 18 insertions(+), 27 deletions(-)

Looks nice! There are quite a few errors during the build-icons phase though:

Toggle snippet (14 lines)
** (process:174): WARNING **: 08:55:01.036: Unable to create profile directory (Permission denied) (13)
Unable to init server: Could not connect: Connection refused
** Message: 08:55:01.044: Cannot create profile directory /homeless-shelter/.config/inkscape.
** Message: 08:55:01.044: Inkscape will run with default settings, and new settings will not be saved.

** (inkscape:174): WARNING **: 08:55:01.109: Could not create directory '/homeless-shelter/.config/inkscape'

** (inkscape:174): WARNING **: 08:55:01.109: Could not create extension error log file '/homeless-shelter/.config/inkscape/extension-errors.log'
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories

We can maybe get rid of them by starting a xorg-server and defining the HOME
variable? Could you please have a look?

Thanks,

Mathieu
T
T
Timotej Lazar wrote on 11 Aug 2022 12:12
[PATCH v2] gnu: wpa-supplicant-gui: Fix build.
(address . 57106@debbugs.gnu.org)(name . Timotej Lazar)(address . timotej.lazar@araneo.si)
20220811101252.1413-1-timotej.lazar@araneo.si
* gnu/packages/admin.scm (wpa-supplicant-gui)[build-system]: Use
qt-build-system.
[phases]: Use G-exps. Drop trailing #t. Don’t wrap-program as that is done by
the build system. Set $HOME to a writable directory when converting icons to
stop Inkscape complaining.
---
Hi,

warnings/errors printed while building icons are harmless. I updated the
patch to set $HOME, which avoids most of them. The X server is also not
needed, and it seems overkill to start it just to suppress a warning.

Thanks!
Timotej

gnu/packages/admin.scm | 48 ++++++++++++++++++------------------------
1 file changed, 21 insertions(+), 27 deletions(-)

Toggle diff (69 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 146423d068..1e6b8ccdbc 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -77,6 +77,7 @@ (define-module (gnu packages admin)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (guix build-system qt)
#:use-module (guix build-system ruby)
#:use-module (guix build-system trivial)
#:use-module (guix download)
@@ -2145,34 +2146,27 @@ (define-public wpa-supplicant-gui
;; For icons.
(modify-inputs (package-native-inputs wpa-supplicant)
(prepend imagemagick inkscape/stable)))
+ (build-system qt-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "wpa_supplicant/wpa_gui-qt4")
- #t))
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "qmake" "wpa_gui.pro")
- (invoke "make" "-j" (number->string (parallel-job-count)))
- (invoke "make" "-C" "icons")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (qt '("qtbase" "qtsvg-5")))
- (install-file "wpa_gui" (string-append out "/bin"))
- (install-file "wpa_gui.desktop"
- (string-append out "/share/applications"))
- (copy-recursively "icons/hicolor"
- (string-append out "/share/icons/hicolor"))
- (wrap-program (string-append out "/bin/wpa_gui")
- `("QT_PLUGIN_PATH" ":" prefix
- ,(map (lambda (label)
- (string-append (assoc-ref inputs label)
- "/lib/qt5/plugins/"))
- qt)))
- #t))))))
+ (list #:test-target "check"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _ (chdir "wpa_supplicant/wpa_gui-qt4")))
+ (replace 'configure
+ (lambda _ (invoke "qmake" "wpa_gui.pro")))
+ (add-after 'build 'build-icons
+ (lambda _
+ ;; Inkscape complains (but works) without a writable $HOME.
+ (setenv "HOME" "/tmp")
+ (invoke "make" "-C" "icons")))
+ (replace 'install
+ (lambda _
+ (install-file "wpa_gui" (string-append #$output "/bin"))
+ (install-file "wpa_gui.desktop"
+ (string-append #$output "/share/applications"))
+ (copy-recursively "icons/hicolor"
+ (string-append #$output "/share/icons/hicolor")))))))
(synopsis "Graphical user interface for WPA supplicant")))
(define-public hostapd
--
2.37.1
M
M
Mathieu Othacehe wrote on 11 Aug 2022 17:11
Re: bug#57106: [PATCH] gnu: wpa-supplicant-gui: Fix build.
(name . Timotej Lazar)(address . timotej.lazar@araneo.si)(address . 57106-done@debbugs.gnu.org)
87fsi224ty.fsf_-_@gnu.org
Toggle quote (3 lines)
> gnu/packages/admin.scm | 48 ++++++++++++++++++------------------------
> 1 file changed, 21 insertions(+), 27 deletions(-)

Pushed, thanks!

Mathieu
Closed
?