1 { lib, stdenv, fetchurl, cmake, openssl, pkg-config, qtbase, qt5compat ? null }:
4 isQt6 = lib.versions.major qtbase.version == "6";
5 in stdenv.mkDerivation rec {
10 url = "mirror://kde/stable/qca/${version}/qca-${version}.tar.xz";
11 sha256 = "sha256-xVXVKYzde2uv4rH5YQbzDPpUOiPUWdUMipHqwzxHbk4=";
14 buildInputs = [ openssl qtbase qt5compat ];
15 nativeBuildInputs = [ cmake pkg-config ];
17 dontWrapQtApps = true;
19 # tells CMake to use this CA bundle file if it is accessible
20 preConfigure = "export QC_CERTSTORE_PATH=/etc/ssl/certs/ca-certificates.crt";
23 (lib.cmakeBool "QT6" isQt6)
24 # tricks CMake into using this CA bundle file if it is not accessible (in a sandbox)
25 "-Dqca_CERTSTORE=/etc/ssl/certs/ca-certificates.crt"
29 description = "Qt Cryptographic Architecture";
30 homepage = "https://invent.kde.org/libraries/qca";
31 maintainers = with maintainers; [ ttuegel ];
32 license = licenses.lgpl21Plus;
33 platforms = with platforms; unix;