guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 0a260233f1d9e9cbfba8c518330ad395cabbbb27
Author: Robin Templeton <[email protected]>
AuthorDate: Mon Jun 23 20:28:06 2025 -0400
gnu: Add qdigidoc.
* gnu/packages/security-token.scm (qdigidoc): New variable.
Change-Id: I895af3cea920f63fd4e7a8cb01cf3704050ef93b
Signed-off-by: Maxim Cournoyer <[email protected]>
---
gnu/packages/security-token.scm | 100 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 0f99a4ec64..2ea1bbdab2 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2023, 2025 Maxim Cournoyer <[email protected]>
;;; Copyright © 2023 Pierre Langlois <[email protected]>
;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
+;;; Copyright © 2025 Robin Templeton <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -63,6 +64,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages crates-io)
+ #:use-module (gnu packages crypto)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages dns)
@@ -79,9 +81,11 @@
#:use-module (gnu packages man)
#:use-module (gnu packages networking)
#:use-module (gnu packages cyrus-sasl)
+ #:use-module (gnu packages openldap)
#:use-module (gnu packages popt)
#:use-module (gnu packages readline)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages serialization)
#:use-module (gnu packages tls)
#:use-module (gnu packages tex)
#:use-module (gnu packages perl)
@@ -1211,3 +1215,99 @@ It also has limited support for Mifare Classic
compatible cards (Thalys card)")
contactless (RFID) and contact USB chipcard readers.")
(home-page "http://www.reiner-sct.com/")
(license license:lgpl2.1+)))
+
+(define-public qdigidoc
+ (package
+ (name "qdigidoc")
+ (version "4.8.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/open-eid/DigiDoc4-Client")
+ (commit (string-append "v" version))
+ ;; The repository contains two git modules, an empty and obsolete
+ ;; "cmake" repository and https://github.com/open-eid/qt-common,
+ ;; which is an internal "libdigidoccommon" library with no
+ ;; support for standalone installation.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "05ncaw8m6d5lsswji950yx4p96y3ri0254vwrrdn4vkkflkc8any"))))
+ (build-system cmake-build-system)
+ (native-inputs
+ (list pkg-config
+ gettext-minimal
+ qtbase
+ qttools
+ ;; These XML files are normally downloaded at build time. The
+ ;; latest pivot version of eu-lotl.xml is used here for its stable
+ ;; URL (the main eu-lotl.xml file should still be checked
+ ;; occasionally for new pivot versions), and estonian-tsl.xml must
+ ;; be updated when the document changes. The signatures in these
+ ;; files haven't been verified (they're not if downloaded while
+ ;; building, either), but it should be possible to verify them
+ ;; using tools like xmlsec or DSS (https://github.com/esig/dss).
+ (origin
+ (method url-fetch)
+ (uri
+ "https://ec.europa.eu/tools/lotl/eu-lotl-pivot-341.xml")
+ (sha256
+ (base32
+ "1l8nyhiifzm54lvb955vk1x46byf22dhckv1ijmqpkjpijlkqcpx")))
+ (origin
+ (method url-fetch)
+ (uri
+ "https://sr.riik.ee/tsl/estonian-tsl.xml")
+ (sha256
+ (base32
+ "1pf0mbh4g5x5j56ckpllhbng047645wlv2j5bs8647n9aq5jnpg3")))))
+ (inputs (list flatbuffers
+ libdigidocpp
+ openldap
+ opensc
+ openssl
+ pcsc-lite
+ qtsvg
+ zlib))
+ (arguments
+ (list
+ #:tests? #f ;no test suite
+ #:modules '((guix build cmake-build-system)
+ (guix build utils)
+ (sxml simple))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; QDigiDoc4 dlopens OpenSC libraries.
+ (add-after 'unpack 'patch-opensc-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "client/QPKCS11.cpp"
+ (("\"opensc-pkcs11.so\"")
+ (format #f "~S"
+ (search-input-file inputs
+ "lib/opensc-pkcs11.so"))))))
+ ;; Prevent use of TSLDownload at build time; see
+ ;; client/CMakeLists.txt. The files are copied to the build
+ ;; directory so that each has its expected path and filename.
+ (add-after 'unpack 'generate-tsl-qrc
+ (lambda* (#:key inputs #:allow-other-keys)
+ (copy-file #$(this-package-native-input "eu-lotl-pivot-341.xml")
+ "client/eu-lotl.xml")
+ (copy-file #$(this-package-native-input "estonian-tsl.xml")
+ "client/EE.xml")
+ (call-with-output-file "client/TSL.qrc"
+ (lambda (port)
+ (sxml->xml
+ `(RCC
+ (qresource
+ (@ (prefix "TSL"))
+ (file "eu-lotl.xml")
+ (file "EE.xml")))
+ port))))))))
+ (home-page "https://github.com/open-eid/DigiDoc4-Client")
+ (synopsis "Estonian ID card application")
+ (description
+ "This application provides support for using private and governmental
+e-services, signing and encrypting DigiDoc documents, and configuring Estonian
+ID cards. It requires a running pcscd service and a compatible card reader.")
+ (license license:lgpl2.1+)))