gnu: keepassxc: Record file name of ‘xclip’ and ‘wl-copy’.

* gnu/packages/password-utils.scm (keepassxc)[arguments]: Add
‘record-clipboard-programs’ phase.
[inputs]: Add WL-CLIPBOARD and XCLIP.

Change-Id: I3cfe3d8604da575f6bf5e5cf3ce862fbac099ab6
This commit is contained in:
Ludovic Courtès 2023-12-10 16:55:10 +01:00
parent 63e06f30ce
commit e154196736
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -168,6 +168,25 @@ (define-public keepassxc
#~(list "-DWITH_XC_DOCS=NO"))) #~(list "-DWITH_XC_DOCS=NO")))
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'record-clipboard-programs
(lambda* (#:key inputs #:allow-other-keys)
;; Record the file names of clipboard programs invoked by
;; 'keepassxc-cli clip' and similar.
;;
;; Note: Use 'QString::fromUtf8' rather than 'QStringLiteral' so
;; that the store reference is stored as ASCII instead of
;; UTF-16, which would be invisible to the GC's scanner.
(substitute* "src/cli/Utils.cpp"
(("QStringLiteral\\(\"xclip\"\\)")
(string-append
"QString::fromUtf8(\""
(search-input-file inputs "bin/xclip")
"\")"))
(("QStringLiteral\\(\"wl-copy\"\\)")
(string-append
"QString::fromUtf8(\""
(search-input-file inputs "bin/wl-copy")
"\")")))))
(replace 'check (replace 'check
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests? (when tests?
@ -199,6 +218,8 @@ (define-public keepassxc
qtx11extras qtx11extras
quazip-0 ; XC_KEESHARE quazip-0 ; XC_KEESHARE
readline readline
wl-clipboard ;for 'wl-copy'
xclip ;for 'xclip'
yubikey-personalization ; XC_YUBIKEY yubikey-personalization ; XC_YUBIKEY
zlib)) zlib))
(home-page "https://keepassxc.org") (home-page "https://keepassxc.org")