mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 05:23:16 +00:00
8daa103d1f
Contrary to libdigidocpp's libdigidocpp, qdigidoc uses Qt to load modules and thus causes different search behaviour in dlopen(3). This approach is not required on every platform; on OpenBSD[0] qdigidoc4(1) finds "opensc-pkcs11.so" due to /usr/local/lib/pkcs11/ in the main program's DT_RUNPATH. 0: https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/libexec/ld.so/library_subr.c?annotate=1.51 (line 297)
56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
{ lib, mkDerivation, fetchurl, cmake, gettext
|
|
, pkg-config, libdigidocpp, opensc, openldap, openssl, pcsclite, qtbase
|
|
, qttranslations, qtsvg }:
|
|
|
|
mkDerivation rec {
|
|
pname = "qdigidoc";
|
|
version = "4.2.11";
|
|
|
|
src = fetchurl {
|
|
url =
|
|
"https://github.com/open-eid/DigiDoc4-Client/releases/download/v${version}/qdigidoc4_${version}.110-1804.tar.xz";
|
|
sha256 = "sha256-Sg6lFZeIJn3T/suDc5Z/kNqBf/sIV9c6EJJ0Nr0dwTM=";
|
|
};
|
|
|
|
tsl = fetchurl {
|
|
url = "https://ec.europa.eu/tools/lotl/eu-lotl-pivot-300.xml";
|
|
sha256 = "1cikz36w9phgczcqnwk4k3mx3kk919wy2327jksmfa4cjfjq4a8d";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake gettext pkg-config ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace client/CMakeLists.txt \
|
|
--replace $\{TSL_URL} file://${tsl}
|
|
'';
|
|
|
|
buildInputs = [
|
|
libdigidocpp
|
|
opensc
|
|
openldap
|
|
openssl
|
|
pcsclite
|
|
qtbase
|
|
qtsvg
|
|
qttranslations
|
|
];
|
|
|
|
# qdigidoc4's `QPKCS11::reload()` dlopen()s "opensc-pkcs11.so" in QLibrary,
|
|
# i.e. OpenSC's module is searched for in libQt5Core's DT_RUNPATH and fixing
|
|
# qdigidoc4's DT_RUNPATH has no effect on Linux (at least OpenBSD's ld.so(1)
|
|
# searches the program's runtime path as well).
|
|
# LD_LIBRARY_PATH takes precedence for all calling objects, see dlopen(3).
|
|
# https://github.com/open-eid/cmake/pull/35 might be an alternative.
|
|
qtWrapperArgs = [
|
|
"--prefix LD_LIBRARY_PATH : ${opensc}/lib/pkcs11/"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Qt-based UI for signing and verifying DigiDoc documents";
|
|
homepage = "https://www.id.ee/";
|
|
license = licenses.lgpl21Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ mmahut yana ];
|
|
};
|
|
}
|