From patchwork Thu Aug 11 10:12:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timotej Lazar X-Patchwork-Id: 41550 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 09A8D27BBEA; Thu, 11 Aug 2022 11:29:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7F46B27BBE9 for ; Thu, 11 Aug 2022 11:29:33 +0100 (BST) Received: from localhost ([::1]:45606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oM5RU-0006eo-MV for patchwork@mira.cbaines.net; Thu, 11 Aug 2022 06:29:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM5R1-0006Hz-5C for guix-patches@gnu.org; Thu, 11 Aug 2022 06:29:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oM5R0-0007ma-SR for guix-patches@gnu.org; Thu, 11 Aug 2022 06:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oM5R0-0005Mp-Nv for guix-patches@gnu.org; Thu, 11 Aug 2022 06:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57106] [PATCH v2] gnu: wpa-supplicant-gui: Fix build. Resent-From: Timotej Lazar Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Aug 2022 10:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57106 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57106@debbugs.gnu.org Cc: Timotej Lazar Received: via spool by 57106-submit@debbugs.gnu.org id=B57106.166021371120582 (code B ref 57106); Thu, 11 Aug 2022 10:29:02 +0000 Received: (at 57106) by debbugs.gnu.org; 11 Aug 2022 10:28:31 +0000 Received: from localhost ([127.0.0.1]:51757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM5QU-0005Lt-Oh for submit@debbugs.gnu.org; Thu, 11 Aug 2022 06:28:31 -0400 Received: from araneo.si ([90.157.193.204]:35734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oM5QQ-0005Li-6P for 57106@debbugs.gnu.org; Thu, 11 Aug 2022 06:28:29 -0400 Received: from araneo.si (localhost.lan [127.0.0.1]) by araneo.si (OpenSMTPD) with ESMTP id e6b634db for <57106@debbugs.gnu.org>; Thu, 11 Aug 2022 10:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=araneo.si; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20180623; bh=zWGW1w6S bsg3Z27AxphQkdpnmlg=; b=KAbY0OrPS/17d1xYeG46LdzU4K/DEbr5NR3sfKpr PMZJWlu5IJQDT8vF/6duUfGbHmQ8c5WpEt258rWf1EED8CLRne1mrExhaHD0v/4u PgLzv+yK2eisT+heThJMVdhGMbVQrEupmzdSlkmli6q8R5TLkS4ZO2WLb7Jx1Kvw f4MIVY8/BgLCZJ1E5BeF18+omA+uIlK1frkX3lg+1DYb2PNdVg+I+pAGDw4TAHhs iq5JtvQeWI8rMtIL/4R9PzH8g8fwuD9Sq5SlIZKHcAS8pFbbhxbEgkAeSjPxvLfk ybsMamc3DeVi9pjD7Dsh0yPCWTvTz/znlEwe5ZA5jCxFiQ== Received: by araneo.si (OpenSMTPD) with ESMTPSA id 52302b32 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 11 Aug 2022 10:28:23 +0000 (UTC) From: Timotej Lazar Date: Thu, 11 Aug 2022 12:12:54 +0200 Message-Id: <20220811101252.1413-1-timotej.lazar@araneo.si> X-Mailer: git-send-email 2.37.1 In-Reply-To: <87zggb2m59.fsf@gnu.org> References: <87zggb2m59.fsf@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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(-) 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