summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-08-09 14:12:34 +0200
committerMinijackson <minijackson@riseup.net>2018-08-09 14:12:34 +0200
commite9bb45821f28a804daa39f7defbfc8b69c7fe0b4 (patch)
tree0e396c4d6fc5305db84ade9815726ed4275d32dd /default.nix
downloadnix_repo-e9bb45821f28a804daa39f7defbfc8b69c7fe0b4.tar.gz
nix_repo-e9bb45821f28a804daa39f7defbfc8b69c7fe0b4.zip
First try
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix120
1 files changed, 120 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..3f74b23
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,120 @@
1{
2 nixpkgs ? import <nixpkgs> {},
3
4 kasyncSrc ? pkgs.fetchgit {
5 url = "https://anongit.kde.org/kasync.git";
6 rev = "8a68ad7da7f9d7d10d249a16a474fa7ca82517be";
7 sha256 = "1v55my24d3zhllw77sjzngs6cwddjqf9xw9v0hkwk2gq2znwp6g8";
8 fetchSubmodules = true;
9 },
10
11 kimap2Src ? pkgs.fetchgit {
12 url = "https://anongit.kde.org/kimap2.git";
13 rev = "62df1b858b3fd7c6c4b3229ff5051c0e4996b1be";
14 sha256 = "1q43dzza1v5kjsvzisw5j2750550596s6hra45xbqny08hkpk355";
15 fetchSubmodules = true;
16 },
17
18 kdav2Src ? pkgs.fetchgit {
19 url = "https://anongit.kde.org/kdav2.git";
20 rev = "830f07b99dc8badf5df40edb81cbac63a3ddb3c4";
21 sha256 = "1da6ivjjq9bh855jiv0kzxi83z736iazn747gkaj261ai8qn7spz";
22 fetchSubmodules = true;
23 },
24
25 sinkSrc ? pkgs.fetchgit {
26 url = "https://github.com/KDE/sink";
27 rev = "e1a6d6f5bbaeeffd92a2049849b75e248c2d492b";
28 sha256 = "196vqd7gk93mfizxnfz918rs5g3723ndarx79x84q8qvk7bngc0v";
29 fetchSubmodules = true;
30 },
31
32 compiler ? "gcc7",
33 cmakeBuildType ? "Debug"
34}:
35
36let
37 stdenv = nixpkgs.overrideCC nixpkgs.stdenv nixpkgs.${compiler};
38 pkgs = nixpkgs;
39
40in rec {
41 kasync = stdenv.mkDerivation {
42 name = "kasync";
43 nativeBuildInputs = with pkgs; [ cmake ninja ccache ];
44 buildInputs = with pkgs; with qt5;
45 [ extra-cmake-modules qtbase ];
46
47 src = kasyncSrc;
48
49 inherit cmakeBuildType;
50 };
51
52 kimap2 = stdenv.mkDerivation {
53 name = "kimap2";
54 nativeBuildInputs = with pkgs; [ cmake ninja ccache ];
55 buildInputs = with pkgs; with qt5; with kdeFrameworks;
56 [ extra-cmake-modules qtbase kcoreaddons kcodecs kdeApplications.kmime cyrus_sasl ];
57
58 src = kimap2Src;
59 inherit cmakeBuildType;
60 };
61
62 kdav2 = stdenv.mkDerivation {
63 name = "kdav2";
64 nativeBuildInputs = with pkgs; [ cmake ninja ccache ];
65 buildInputs = with pkgs; with qt5; with kdeFrameworks;
66 [ extra-cmake-modules qtbase qtxmlpatterns kcoreaddons ];
67
68 src = kdav2Src;
69
70 inherit cmakeBuildType;
71 };
72
73 sink = stdenv.mkDerivation {
74 name = "sink";
75 nativeBuildInputs = with pkgs; [ cmake ninja ccache ];
76 buildInputs = with pkgs; with qt5; with kdeApplications;
77 [
78 extra-cmake-modules kmime kcontacts kcalcore
79 flatbuffers lmdb xapian cyrus_sasl curl libgit2 readline
80 qtbase
81
82 kasync kimap2 kdav2
83 ];
84
85 cmakeFlags = [
86 "-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always"
87 "-DCMAKE_EXPORT_COMPILE_COMMANDS=1"
88 ];
89
90 src = sinkSrc;
91
92 inherit cmakeBuildType;
93 };
94
95 kube = stdenv.mkDerivation {
96 name = "kube";
97 nativeBuildInputs = with pkgs; [ cmake ninja ccache ];
98 buildInputs = with pkgs; with qt5; with kdeFrameworks; with kdeApplications; with libsForQt5;
99 [
100 extra-cmake-modules kcalcore kcodecs kcontacts kmime
101 qtbase qtquickcontrols2 qtwebengine qgpgme
102
103 sink kasync
104 ];
105
106 CCACHE_COMPRESS = 1;
107 CCACHE_DIR = "/var/cache/ccache";
108 CCACHE_UMASK = "007";
109
110 cmakeFlags = [
111 #"-DCMAKE_CXX_COMPILER_LAUNCHER=${pkgs.ccache}/bin/ccache"
112 "-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always"
113 "-DCMAKE_EXPORT_COMPILE_COMMANDS=1"
114 ];
115
116 dontStrip = if (cmakeBuildType == "Debug") then 1 else 0;
117
118 src = kubeSrc;
119 };
120}