gnu: qtwebengine: Re-style inputs.

* gnu/packages/qt.scm (qtwebengine)[phases]: Delete trailing #t.
{substitute-source}: Use search-input-file.
[inputs, native-inputs]: Use new style.
This commit is contained in:
Maxim Cournoyer 2022-05-14 02:18:11 -04:00
parent 0740b12df3
commit 12a16c3166
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -1771,69 +1771,68 @@ (define (delete-unwanted-files child stat flag base level)
;; Do not enable support for loading the Widevine DRM plugin. ;; Do not enable support for loading the Widevine DRM plugin.
(substitute* "src/buildtools/config/common.pri" (substitute* "src/buildtools/config/common.pri"
(("enable_widevine=true") (("enable_widevine=true")
"enable_widevine=false")) "enable_widevine=false")))))))
#t)))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("bison" ,bison) (list bison
("flex" ,flex) flex
("gperf" ,gperf) gperf
("ninja" ,ninja) ninja
("perl" ,perl) perl
("pkg-config" ,pkg-config) pkg-config
("python-2" ,python-2) python2-six
("python-six" ,python2-six) python-2
("ruby" ,ruby))) ruby))
(inputs (inputs
`(("alsa-lib" ,alsa-lib) (list alsa-lib
("atk" ,atk) atk
("cups-minimal" ,cups-minimal) cups-minimal
("curl" ,curl) curl
("dbus" ,dbus) dbus
("ffmpeg" ,ffmpeg) ffmpeg
("fontconfig" ,fontconfig) fontconfig
("harbuzz" ,harfbuzz) harfbuzz
("icu4c" ,icu4c) icu4c
("jsoncpp" ,jsoncpp) jsoncpp
("lcms" ,lcms) lcms
("libcap" ,libcap) libcap
("libevent" ,libevent) libevent
("libgcrypt" ,libgcrypt) libgcrypt
("libjpeg" ,libjpeg-turbo) libjpeg-turbo
("libvpx" ,libvpx) libvpx
("libwebp" ,libwebp) libwebp
("libx11" ,libx11) libx11
("libxcb" ,libxcb) libxcb
("libxcomposite" ,libxcomposite) libxcomposite
("libxcursor" ,libxcursor) libxcursor
("libxi" ,libxi) libxi
("libxkbcommon" ,libxkbcommon) libxkbcommon
;; FIXME: libxml2 needs to built with icu support though it links to ;; FIXME: libxml2 needs to built with icu support though it links to
;; libxml2 configure summary still states "Checking for compatible ;; libxml2 configure summary still states "Checking for compatible
;; system libxml2... no" ;; system libxml2... no"
("libxml2" ,libxml2) libxml2
("openh264" ,openh264) openh264
("libxrandr" ,libxrandr) libxrandr
("libxrender" ,libxrender) libxrender
("libxslt" ,libxslt) libxslt
("libxtst" ,libxtst) libxtst
("mesa" ,mesa) mesa
("minizip" ,minizip) minizip
("nss" ,nss) nss
("opus" ,opus) opus
("pciutils" ,pciutils) pciutils
("protobuf" ,protobuf) protobuf
("pulseaudio" ,pulseaudio) pulseaudio
("qtbase" ,qtbase-5) qtbase-5
("qtdeclarative" ,qtdeclarative) qtdeclarative
("qtmultimedia" ,qtmultimedia) qtmultimedia
("qtwebchannel" ,qtwebchannel) qtwebchannel
("re2" ,re2) re2
("snappy" ,snappy) snappy
("udev" ,eudev) eudev
("valgrind" ,valgrind) valgrind
("vulkan-headers" ,vulkan-headers) vulkan-headers
("xcb-util" ,xcb-util))) xcb-util))
(arguments (arguments
(substitute-keyword-arguments (package-arguments qtsvg) (substitute-keyword-arguments (package-arguments qtsvg)
((#:modules modules '()) ((#:modules modules '())
@ -1844,13 +1843,12 @@ (define (delete-unwanted-files child stat flag base level)
`(modify-phases ,phases `(modify-phases ,phases
(add-before 'configure 'substitute-source (add-before 'configure 'substitute-source
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out")))
(nss (assoc-ref inputs "nss")) (with-atomic-file-replacement
(udev (assoc-ref inputs "udev"))) "src/buildtools/config/linux.pri"
(with-atomic-file-replacement "src/buildtools/config/linux.pri" (lambda (in out)
(lambda (in out) (display (get-string-all in) out)
(display (get-string-all in) out) (display "\ngn_args += use_system_openh264=true\n" out)))
(display "\ngn_args += use_system_openh264=true\n" out)))
;; Qtwebengine is not installed into the same prefix as ;; Qtwebengine is not installed into the same prefix as
;; qtbase. Some qtbase QTLibraryInfo constants will not ;; qtbase. Some qtbase QTLibraryInfo constants will not
;; work. Replace with the full path to the qtwebengine ;; work. Replace with the full path to the qtwebengine
@ -1863,12 +1861,11 @@ (define (delete-unwanted-files child stat flag base level)
;; Substitute full dynamic library path for nss. ;; Substitute full dynamic library path for nss.
(substitute* "src/3rdparty/chromium/crypto/nss_util.cc" (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
(("libnssckbi.so") (("libnssckbi.so")
(string-append nss "/lib/nss/libnssckbi.so"))) (search-input-file inputs "lib/nss/libnssckbi.so")))
;; Substitute full dynamic library path for udev. ;; Substitute full dynamic library path for udev.
(substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc" (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
(("libudev.so.1") (("libudev.so.1")
(string-append udev "/lib/libudev.so.1"))) (search-input-file inputs "lib/libudev.so.1"))))))
#t)))
(add-before 'configure 'set-env (add-before 'configure 'set-env
(lambda _ (lambda _
;; Avoids potential race conditions. ;; Avoids potential race conditions.
@ -1876,8 +1873,7 @@ (define (delete-unwanted-files child stat flag base level)
(setenv "NINJAFLAGS" (setenv "NINJAFLAGS"
(string-append "-k1" ;less verbose build output (string-append "-k1" ;less verbose build output
;; Respect the '--cores' option of 'guix build'. ;; Respect the '--cores' option of 'guix build'.
" -j" (number->string (parallel-job-count)))) " -j" (number->string (parallel-job-count))))))
#t))
(replace 'configure (replace 'configure
(lambda _ (lambda _
;; Valid QT_BUILD_PARTS variables are: ;; Valid QT_BUILD_PARTS variables are: