nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, openssl, cmake, pkgconfig, qt, darwin }:
2
3stdenv.mkDerivation rec {
4 pname = "qca";
5 version = "2.2.1";
6
7 src = fetchurl {
8 url = "http://download.kde.org/stable/qca/${version}/qca-${version}.tar.xz";
9 sha256 = "00kv1vsrc8fp556hm8s6yw3240vx3l4067q6vfxrb3gdwgcd45np";
10 };
11
12 nativeBuildInputs = [ cmake pkgconfig ];
13 buildInputs = [ openssl qt ]
14 ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
15
16 enableParallelBuilding = true;
17
18 # tells CMake to use this CA bundle file if it is accessible
19 preConfigure = ''
20 export QC_CERTSTORE_PATH=/etc/ssl/certs/ca-certificates.crt
21 '';
22
23 # tricks CMake into using this CA bundle file if it is not accessible (in a sandbox)
24 cmakeFlags = [ "-Dqca_CERTSTORE=/etc/ssl/certs/ca-certificates.crt" ];
25
26 postPatch = ''
27 sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt
28 '';
29
30 meta = with stdenv.lib; {
31 description = "Qt Cryptographic Architecture";
32 license = "LGPL";
33 homepage = http://delta.affinix.com/qca;
34 maintainers = [ maintainers.sander ];
35 platforms = platforms.unix;
36 };
37}