GNU bug report logs - #31102
[PATCH] gnu: wpa-supplicant: Install wpa_gui.

Previous Next

Package: guix-patches;

Reported by: Marius Bakke <mbakke <at> fastmail.com>

Date: Sun, 8 Apr 2018 20:24:01 UTC

Severity: normal

Tags: patch

Done: Marius Bakke <mbakke <at> fastmail.com>

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 31102 in the body.
You can then email your comments to 31102 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#31102; Package guix-patches. (Sun, 08 Apr 2018 20:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marius Bakke <mbakke <at> fastmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 08 Apr 2018 20:24:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: guix-patches <at> gnu.org
Cc: Marius Bakke <mbakke <at> fastmail.com>
Subject: [PATCH] gnu: wpa-supplicant: Install wpa_gui.
Date: Sun,  8 Apr 2018 22:22:41 +0200
* 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 <at> sturm.com.au>
 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23 <at> gmail.com>
 ;;; Copyright © 2017 Christopher Allan Webber <cwebber <at> dustycloud.org>
-;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
+;;; Copyright © 2017, 2018 Marius Bakke <mbakke <at> fastmail.com>
 ;;; Copyright © 2018 Arun Isaac <arunisaac <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#31102; Package guix-patches. (Mon, 09 Apr 2018 20:40:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 31102 <at> debbugs.gnu.org
Subject: Re: [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
Date: Mon, 09 Apr 2018 22:39:39 +0200
Hi Marius,

Marius Bakke <mbakke <at> 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’.




Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Mon, 23 Apr 2018 18:20:01 GMT) Full text and rfc822 format available.

Notification sent to Marius Bakke <mbakke <at> fastmail.com>:
bug acknowledged by developer. (Mon, 23 Apr 2018 18:20:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 31102-done <at> debbugs.gnu.org
Subject: Re: [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
Date: Mon, 23 Apr 2018 20:19:11 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi Marius,
>
> Marius Bakke <mbakke <at> 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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#31102; Package guix-patches. (Wed, 25 Apr 2018 22:12:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 31102-done <at> debbugs.gnu.org
Subject: Re: [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
Date: Thu, 26 Apr 2018 00:11:40 +0200
Howdy Marius,

Marius Bakke <mbakke <at> fastmail.com> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>> Hi Marius,
>>
>> Marius Bakke <mbakke <at> 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’.




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

This bug report was last modified 5 years and 339 days ago.

Previous Next


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