Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 cmake, 6 openssl, 7 pkg-config, 8 qtbase, 9 qt5compat ? null, 10}: 11 12let 13 isQt6 = lib.versions.major qtbase.version == "6"; 14in 15stdenv.mkDerivation rec { 16 pname = "qca"; 17 version = "2.3.10"; 18 19 src = fetchurl { 20 url = "mirror://kde/stable/qca/${version}/qca-${version}.tar.xz"; 21 sha256 = "sha256-HFtyLak9VZNlcZImuxIccm7DwNxMZ96jTx5Q5ODRSgI="; 22 }; 23 24 buildInputs = [ 25 openssl 26 qtbase 27 qt5compat 28 ]; 29 nativeBuildInputs = [ 30 cmake 31 pkg-config 32 ]; 33 34 dontWrapQtApps = true; 35 36 # tells CMake to use this CA bundle file if it is accessible 37 preConfigure = "export QC_CERTSTORE_PATH=/etc/ssl/certs/ca-certificates.crt"; 38 39 cmakeFlags = [ 40 (lib.cmakeBool "QT6" isQt6) 41 # tricks CMake into using this CA bundle file if it is not accessible (in a sandbox) 42 "-Dqca_CERTSTORE=/etc/ssl/certs/ca-certificates.crt" 43 ]; 44 45 meta = with lib; { 46 description = "Qt Cryptographic Architecture"; 47 homepage = "https://invent.kde.org/libraries/qca"; 48 maintainers = with maintainers; [ ttuegel ]; 49 license = licenses.lgpl21Plus; 50 platforms = with platforms; unix; 51 }; 52}