* [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
@ 2018-04-08 20:22 Marius Bakke
2018-04-09 20:39 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2018-04-08 20:22 UTC (permalink / raw)
To: 31102
* gnu/packages/admin.scm (wpa-supplicant)[inputs]: Add QTBASE and QTSVG.
[native-inputs]: Add IMAGEMAGICK and INKSCAPE.
[outputs]: New field.
[arguments]: Add phases 'build-wpa-gui' and 'install-wpa-gui'.
---
gnu/packages/admin.scm | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 6a7bed389..8b64a531e 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -18,7 +18,7 @@
;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
-;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
@@ -68,6 +68,8 @@
#:use-module (gnu packages bison)
#:use-module (gnu packages flex)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages imagemagick)
+ #:use-module (gnu packages inkscape)
#:use-module (gnu packages openldap)
#:use-module (gnu packages mcrypt)
#:use-module (gnu packages pkg-config)
@@ -75,6 +77,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web)
+ #:use-module (gnu packages qt)
#:use-module (gnu packages terminals)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages groff)
@@ -1110,7 +1113,15 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
(package (inherit wpa-supplicant-minimal)
(name "wpa-supplicant")
(inputs `(("dbus" ,dbus)
+ ("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)
,@(package-inputs wpa-supplicant-minimal)))
+ (native-inputs
+ ;; For icons.
+ `(("imagemagick" ,imagemagick)
+ ("inkscape" ,inkscape)
+ ,@(package-native-inputs wpa-supplicant-minimal)))
+ (outputs '("out" "gui"))
(arguments
(substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
((#:phases phases)
@@ -1124,6 +1135,32 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
(close-port port))
#t))
+ (add-after 'build 'build-wpa-gui
+ (lambda _
+ (with-directory-excursion "wpa_gui-qt4"
+ (invoke "qmake" "wpa_gui.pro")
+ (invoke "make" "-j" (number->string (parallel-job-count)))
+ (invoke "make" "-C" "icons"))))
+ (add-after 'install 'install-wpa-gui
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((gui (assoc-ref outputs "gui"))
+ (qt '("qtbase" "qtsvg")))
+ (with-directory-excursion "wpa_gui-qt4"
+ (substitute* "wpa_gui.desktop"
+ (("Exec=wpa_gui")
+ (string-append "Exec=" gui "/bin/wpa_gui")))
+ (install-file "wpa_gui" (string-append gui "/bin"))
+ (install-file "wpa_gui.desktop"
+ (string-append gui "/share/applications"))
+ (copy-recursively "icons/hicolor"
+ (string-append gui "/share/icons/hicolor"))
+ (wrap-program (string-append gui "/bin/wpa_gui")
+ `("QT_PLUGIN_PATH" ":" prefix
+ ,(map (lambda (label)
+ (string-append (assoc-ref inputs label)
+ "/lib/qt5/plugins/"))
+ qt)))
+ #t))))
(add-after 'install-man-pages 'install-dbus-conf
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
2018-04-08 20:22 [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui Marius Bakke
@ 2018-04-09 20:39 ` Ludovic Courtès
2018-04-23 18:19 ` bug#31102: " Marius Bakke
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2018-04-09 20:39 UTC (permalink / raw)
To: Marius Bakke; +Cc: 31102
Hi Marius,
Marius Bakke <mbakke@fastmail.com> skribis:
> * gnu/packages/admin.scm (wpa-supplicant)[inputs]: Add QTBASE and QTSVG.
> [native-inputs]: Add IMAGEMAGICK and INKSCAPE.
> [outputs]: New field.
> [arguments]: Add phases 'build-wpa-gui' and 'install-wpa-gui'.
The patch LGTM, but I wonder if we should make it a separate package.
Since it uses a separate output, that should be fine *if* you get
substitutes. If you don’t, then you end up building Qt.
Since wpa_supplicant is a requirement for most GuixSD configs, that
could be an issue.
From the patch, it seems that the GUI is well isolated, in a separate
directory, with a different build system and all. Do you think it would
work to make a separate “wpa-supplicant-gui” package? WDYT?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#31102: [PATCH] gnu: wpa-supplicant: Install wpa_gui.
2018-04-09 20:39 ` Ludovic Courtès
@ 2018-04-23 18:19 ` Marius Bakke
2018-04-25 22:11 ` [bug#31102] " Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2018-04-23 18:19 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 31102-done
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> Hi Marius,
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> * gnu/packages/admin.scm (wpa-supplicant)[inputs]: Add QTBASE and QTSVG.
>> [native-inputs]: Add IMAGEMAGICK and INKSCAPE.
>> [outputs]: New field.
>> [arguments]: Add phases 'build-wpa-gui' and 'install-wpa-gui'.
>
> The patch LGTM, but I wonder if we should make it a separate package.
>
> Since it uses a separate output, that should be fine *if* you get
> substitutes. If you don’t, then you end up building Qt.
>
> Since wpa_supplicant is a requirement for most GuixSD configs, that
> could be an issue.
>
> From the patch, it seems that the GUI is well isolated, in a separate
> directory, with a different build system and all. Do you think it would
> work to make a separate “wpa-supplicant-gui” package? WDYT?
Yes, that makes sense. I pushed it as a separate package in
050e5756781cdfed2d790e15c67bc48c9aced131.
I'm now using the GUI to manage all wireless connections along with a
custom WPA Supplicant service that will be submitted in due time.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
2018-04-23 18:19 ` bug#31102: " Marius Bakke
@ 2018-04-25 22:11 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2018-04-25 22:11 UTC (permalink / raw)
To: Marius Bakke; +Cc: 31102-done
Howdy Marius,
Marius Bakke <mbakke@fastmail.com> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi Marius,
>>
>> Marius Bakke <mbakke@fastmail.com> skribis:
>>
>>> * gnu/packages/admin.scm (wpa-supplicant)[inputs]: Add QTBASE and QTSVG.
>>> [native-inputs]: Add IMAGEMAGICK and INKSCAPE.
>>> [outputs]: New field.
>>> [arguments]: Add phases 'build-wpa-gui' and 'install-wpa-gui'.
>>
>> The patch LGTM, but I wonder if we should make it a separate package.
>>
>> Since it uses a separate output, that should be fine *if* you get
>> substitutes. If you don’t, then you end up building Qt.
>>
>> Since wpa_supplicant is a requirement for most GuixSD configs, that
>> could be an issue.
>>
>> From the patch, it seems that the GUI is well isolated, in a separate
>> directory, with a different build system and all. Do you think it would
>> work to make a separate “wpa-supplicant-gui” package? WDYT?
>
> Yes, that makes sense. I pushed it as a separate package in
> 050e5756781cdfed2d790e15c67bc48c9aced131.
Awesome, thank you!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-25 22:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-08 20:22 [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui Marius Bakke
2018-04-09 20:39 ` Ludovic Courtès
2018-04-23 18:19 ` bug#31102: " Marius Bakke
2018-04-25 22:11 ` [bug#31102] " Ludovic Courtès
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).