unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 48849@debbugs.gnu.org
Subject: [bug#48849] [PATCH core-updates]: Add #:sh argument to wrap-qt-program
Date: Sat, 05 Jun 2021 13:49:23 +0200	[thread overview]
Message-ID: <678f5b29c1b5e2100bfde5b5121c57a9d2d2f3d8.camel@telenet.be> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 581 bytes --]

Hi guix,

This patch series adds a #:sh keyword argument to wrap-qt-program
and adjusts callers to set this keyword argument appropriately.

Setting this argument appropriately is required for cross-compilation.
Otherwise, a bash for SYSTEM (as in --system=..) is used instead
of a bash for TARGET (as in --target=...).

I didn't test building some qt programs with this patch series yet,
as I'm currently waiting on the substitute servers to catch up
with recent changed to core-updates (to avoid building a tower
of rusts). I'll do that later.

Greetings,
Maxime

[-- Attachment #1.2: 0001-qt-utils-Allow-overriding-the-shell-interpreter-in-w.patch --]
[-- Type: text/x-patch, Size: 1512 bytes --]

From 27d42f25f54b16f382e18b9ef0fb202fb00da90d Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:02:16 +0200
Subject: [PATCH 1/8] qt-utils: Allow overriding the shell interpreter in
 'wrap-qt-program'.

* guix/build/qt-utils.scm (wrap-qt-program): Introduce a #:sh keyword
  argument and pass it to 'wrap-program'.
---
 guix/build/qt-utils.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm
index d2486ee86c..60e699fe39 100644
--- a/guix/build/qt-utils.scm
+++ b/guix/build/qt-utils.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 David Craven <david@craven.ch>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,7 +21,7 @@
   #:use-module (guix build utils)
   #:export (wrap-qt-program))
 
-(define (wrap-qt-program out program)
+(define* (wrap-qt-program out program #:key (sh (which "bash")))
   (define (suffix env-var path)
     (let ((env-val (getenv env-var)))
       (if env-val (string-append env-val ":" path) path)))
@@ -34,6 +35,7 @@
         (xdg-config-path (suffix "XDG_CONFIG_DIRS"
                                  (string-append out "/etc/xdg"))))
     (wrap-program (string-append out "/bin/" program)
+      #:sh sh
       `("QML2_IMPORT_PATH" = (,qml-path))
       `("QT_PLUGIN_PATH" = (,plugin-path))
       `("XDG_DATA_DIRS" = (,xdg-data-path))
-- 
2.31.1


[-- Attachment #1.3: 0002-gnu-qbittorrent-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1267 bytes --]

From 8ed53a6840b1099c8ccc50a1779187e186dfb7af Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:20 +0200
Subject: [PATCH 2/8] gnu: qbittorrent: Set #:sh argument of 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/bittorrent.scm
  (qbittorrent)[arguments]<#:phases>{wrap-qt}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/bittorrent.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 29b0d62ad2..339248da94 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -448,8 +448,9 @@ desktops.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'install 'wrap-qt
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-qt-program (assoc-ref outputs "out") "qbittorrent")
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "qbittorrent"
+                              #:sh (search-input-file inputs "bin/bash"))
              #t)))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
-- 
2.31.1


[-- Attachment #1.4: 0003-gnu-electron-cash-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1430 bytes --]

From b02b0ea202d5e3970e5df2a461b83990c9edfc81 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:20 +0200
Subject: [PATCH 3/8] gnu: electron-cash: Set #:sh argument of
 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/finance.scm
  (electron-cash)[arguments]<#:phases>{wrap-qt}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/finance.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index fbd7df783c..029df4f934 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -618,8 +618,9 @@ other machines/servers.  Electrum does not download the Bitcoin blockchain.")
                                (assoc-ref inputs "libsecp256k1")
                                "/lib/libsecp256k1.so.0'")))))
          (add-after 'install 'wrap-qt
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-qt-program (assoc-ref outputs "out") "electron-cash"))))))
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "electron-cash"
+                              #:sh (search-input-file inputs "bin/bash")))))))
     (home-page "https://electroncash.org/")
     (synopsis "Bitcoin Cash wallet")
     (description
-- 
2.31.1


[-- Attachment #1.5: 0004-gnu-qgis-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1310 bytes --]

From eac4a9fbd09bde8d52bd38f00a23aa11cd24ffa0 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:20 +0200
Subject: [PATCH 4/8] gnu: qgis: Set #:sh argument of 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/geo.scm
  (qgis)[arguments]<#:phases>{wrap-qt}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/geo.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index c4bdb6aca0..65b763ecbe 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -2224,8 +2224,9 @@ growing set of geoscientific methods.")
          (add-after 'install 'wrap-python
            (assoc-ref python:%standard-phases 'wrap))
          (add-after 'wrap-python 'wrap-qt
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-qt-program (assoc-ref outputs "out") "qgis")
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "qgis"
+                              #:sh (search-input-file "bin/bash"))
              #t))
          (add-after 'wrap-qt 'wrap-gis
            (lambda* (#:key inputs outputs #:allow-other-keys)
-- 
2.31.1


[-- Attachment #1.6: 0005-gnu-keepassxc-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1287 bytes --]

From d34d7b0cd464b6abbe7ffa30f8c674a61a14f886 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:20 +0200
Subject: [PATCH 5/8] gnu: keepassxc: Set #:sh argument of 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/password-utils.scm
  (keepassxc)[arguments]<#:phases>{wrap-qt}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/password-utils.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 310253c2a4..2a5a1e5c9f 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -146,8 +146,9 @@ human.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'install 'wrap-qt
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-qt-program (assoc-ref outputs "out") "keepassxc")
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "keepassxc"
+                              #:sh (search-input-file inputs "bin/bash"))
              #t)))))
     (native-inputs
      `(("asciidoctor" ,ruby-asciidoctor)
-- 
2.31.1


[-- Attachment #1.7: 0006-gnu-qtpass-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1366 bytes --]

From 256910012b96e0c7489ac65e7748f4806906c360 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:21 +0200
Subject: [PATCH 6/8] gnu: qtpass: Set #:sh argument of 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/password-utils.scm
  (qtpass)[arguments]<#:phases>{wrap-qt}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/password-utils.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 2a5a1e5c9f..19b1b5623c 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -683,8 +683,9 @@ key URIs using the standard otpauth:// scheme.")
                (install-file "qtpass.1" man)
                #t)))
          (add-after 'install 'wrap-qt
-           (lambda* (#:key outputs #:allow-other-keys)
-             (wrap-qt-program (assoc-ref outputs "out") "qtpass")
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-qt-program (assoc-ref outputs "out") "qtpass"
+                              #:sh (search-input-file inputs "bin/bash"))
              #t))
          (add-before 'check 'check-setup
            ;; Make Qt render "offscreen", required for tests.
-- 
2.31.1


[-- Attachment #1.8: 0007-gnu-openshot-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1420 bytes --]

From 23486d123442d63aac7b54ec0c4d0b4786237762 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:21 +0200
Subject: [PATCH 7/8] gnu: openshot: Set #:sh argument of 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/video.scm
  (openshot)[arguments]<#:phases>{wrap-program}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/video.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 4b1d2540e4..250ca944aa 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -4560,9 +4560,10 @@ API.  It includes bindings for Python, Ruby, and other languages.")
                       (setenv "HOME" "/tmp")
                       #t))
                   (add-after 'install 'wrap-program
-                    (lambda* (#:key outputs #:allow-other-keys)
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out")))
-                        (wrap-qt-program out "openshot-qt"))
+                        (wrap-qt-program out "openshot-qt"
+                                         #:sh (search-input-file "bin/bash")))
                       #t)))))
     (home-page "https://www.openshot.org/")
     (synopsis "Video editor")
-- 
2.31.1


[-- Attachment #1.9: 0008-gnu-kristall-Set-sh-argument-of-wrap-qt-program.patch --]
[-- Type: text/x-patch, Size: 1389 bytes --]

From 92803cbef5affa3dbbf049262e1fcf290d8d8622 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 5 Jun 2021 11:04:21 +0200
Subject: [PATCH 8/8] gnu: kristall: Set #:sh argument of 'wrap-qt-program'.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gnu/packages/web-browsers.scm
  (kristall)[arguments]<#:phases>{wrap-program}:
  Set #:sh argument of ‘wrap-qt-program’.
---
 gnu/packages/web-browsers.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index af178f9092..3633ff34a8 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -443,9 +443,10 @@ access.")
                    "/share/fonts/truetype/NotoColorEmoji")))
                #t))
            (add-after 'install 'wrap-program
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let ((out (assoc-ref outputs "out")))
-                 (wrap-qt-program out "kristall"))
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (bash (search-input-file inputs "bin/bash")))
+                 (wrap-qt-program out "kristall" #:sh bash))
                #t)))))
       (native-inputs
        `(("breeze-stylesheet"
-- 
2.31.1


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

             reply	other threads:[~2021-06-05 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05 11:49 Maxime Devos [this message]
2024-01-20 22:24 ` [bug#48849] [PATCH core-updates]: Add #:sh argument to wrap-qt-program Maxim Cournoyer
2024-01-20 23:04   ` [bug#48849] [PATCH core-updates]: Add #:sh argument towrap-qt-program M
2024-01-22  4:58     ` [bug#48849] [PATCH core-updates]: Add #:sh argument to wrap-qt-program Maxim Cournoyer
2024-01-22  5:12 ` bug#48849: " Maxim Cournoyer

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=678f5b29c1b5e2100bfde5b5121c57a9d2d2f3d8.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=48849@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).