-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
112 lines (101 loc) · 3.09 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# SPDX-FileCopyrightText: (C) 2022 Claudio Cambra <claudio.cambra@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
{
description = "A flake for kalendar";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib;
eachSystem [ "aarch64-linux" "x86_64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
};
nativeBuildInputs = with pkgs; [
cmake
extra-cmake-modules
qt5.wrapQtAppsHook
];
buildInputs = with pkgs; [
mariadb
gpgme
qt5.qtbase
qt5.qtquickcontrols2
qt5.qtsvg
qt5.qtlocation
qt5.qtgraphicaleffects
qt5.qtdeclarative
libsForQt5.breeze-icons
libsForQt5.qqc2-desktop-style
libsForQt5.kirigami2
libsForQt5.kdbusaddons
libsForQt5.ki18n
libsForQt5.kcalendarcore
libsForQt5.kconfigwidgets
libsForQt5.kwindowsystem
libsForQt5.kcoreaddons
libsForQt5.kcontacts
libsForQt5.kitemmodels
libsForQt5.kxmlgui
libsForQt5.knotifications
libsForQt5.kiconthemes
libsForQt5.kservice
libsForQt5.kmime
libsForQt5.kpackage
libsForQt5.kio
libsForQt5.calendarsupport
libsForQt5.messagelib
libsForQt5.mailcommon
libsForQt5.pimcommon
libsForQt5.akonadi
libsForQt5.akonadi-search
libsForQt5.akonadi-contacts
libsForQt5.akonadi-calendar
libsForQt5.kdepim-runtime
];
packages.default = with pkgs; stdenv.mkDerivation rec {
inherit nativeBuildInputs buildInputs;
pname = "kalendar";
version = "dev";
src = ./.;
propagatedUserEnvPkgs = [
libsForQt5.akonadi
libsForQt5.kdepim-runtime
];
dontStrip = true;
enableDebugging = true;
separateDebugInfo = false;
postFixup = ''
wrapProgram "$out/bin/kalendar" \
--set PATH ${lib.makeBinPath [
libsForQt5.akonadi
libsForQt5.kdepim-runtime
]} \
--set QML_DISABLE_DISK_CACHE "1"
'';
};
apps.default = mkApp {
name = "kalendar";
drv = packages.default;
};
in {
inherit packages apps;
devShell = pkgs.mkShell {
inherit buildInputs;
nativeBuildInputs = with pkgs; nativeBuildInputs ++[
clang-tools
libclang.python
ninja
gdb
kdevelop
];
name = "kalendar-shell";
shellHook = ''
export AKONADI_INSTANCE=devel
'';
};
}
);
}