1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 qtbase,
6 qmake,
7 qca-qt5,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "qoauth";
12 version = "2.0.0";
13
14 src = fetchFromGitHub {
15 owner = "ayoy";
16 repo = "qoauth";
17 rev = "v${version}";
18 name = "qoauth-${version}.tar.gz";
19 sha256 = "1b2jdqs526ac635yb2whm049spcsk7almnnr6r5b4yqhq922anw3";
20 };
21
22 postPatch = ''
23 sed -i src/src.pro \
24 -e 's/lib64/lib/g' \
25 -e '/features.path =/ s|$$\[QMAKE_MKSPECS\]|$$NIX_OUTPUT_DEV/mkspecs|'
26 '';
27
28 buildInputs = [
29 qtbase
30 qca-qt5
31 ];
32 nativeBuildInputs = [ qmake ];
33
34 env.NIX_CFLAGS_COMPILE = "-I${qca-qt5}/include/Qca-qt5/QtCrypto";
35 NIX_LDFLAGS = "-lqca-qt5";
36
37 dontWrapQtApps = true;
38
39 meta = with lib; {
40 description = "Qt library for OAuth authentication";
41 inherit (qtbase.meta) platforms;
42 license = licenses.lgpl21;
43 };
44}