forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / libraries / qca / default.nix
bloba8651c9c2a5f38b1175ffd5735d5bac1f30938a8
1 { lib, stdenv, fetchurl, cmake, openssl, pkg-config, qtbase, qt5compat ? null }:
3 let
4   isQt6 = lib.versions.major qtbase.version == "6";
5 in stdenv.mkDerivation rec {
6   pname = "qca";
7   version = "2.3.9";
9   src = fetchurl {
10     url = "mirror://kde/stable/qca/${version}/qca-${version}.tar.xz";
11     sha256 = "sha256-xVXVKYzde2uv4rH5YQbzDPpUOiPUWdUMipHqwzxHbk4=";
12   };
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";
22   cmakeFlags = [
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"
26   ];
28   meta = with lib; {
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;
34   };