From: Marius Bakke <mbakke@fastmail.com>
To: 31102@debbugs.gnu.org
Subject: [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui.
Date: Sun, 8 Apr 2018 22:22:41 +0200 [thread overview]
Message-ID: <20180408202241.10285-1-mbakke@fastmail.com> (raw)
* 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
next reply other threads:[~2018-04-08 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-08 20:22 Marius Bakke [this message]
2018-04-09 20:39 ` [bug#31102] [PATCH] gnu: wpa-supplicant: Install wpa_gui Ludovic Courtès
2018-04-23 18:19 ` bug#31102: " Marius Bakke
2018-04-25 22:11 ` [bug#31102] " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180408202241.10285-1-mbakke@fastmail.com \
--to=mbakke@fastmail.com \
--cc=31102@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).