1{ lib, stdenv
2, fetchFromGitLab
3, extra-cmake-modules
4, botan3
5, karchive
6, kauth
7, libdrm
8, hwdata
9, glxinfo
10, polkit
11, procps
12, pugixml
13, spdlog
14, util-linux
15, vulkan-tools
16, qtbase
17, qtcharts
18, qtquickcontrols2
19, qtsvg
20, qttools
21, qtxmlpatterns
22, quazip
23, wrapQtAppsHook
24} :
25
26stdenv.mkDerivation rec{
27 pname = "corectrl";
28 version = "1.4.1";
29
30 src = fetchFromGitLab {
31 owner = "corectrl";
32 repo = "corectrl";
33 rev = "v${version}";
34 hash = "sha256-E2Dqe1IYXjFb/nShQX+ARZW/AWpNonRimb3yQ6/2CFw=";
35 };
36 patches = [
37 ./polkit-dir.patch
38 ];
39
40 nativeBuildInputs = [
41 extra-cmake-modules
42 wrapQtAppsHook
43 ];
44 buildInputs = [
45 botan3
46 karchive
47 kauth
48 libdrm
49 glxinfo
50 polkit
51 procps
52 pugixml
53 spdlog
54 util-linux
55 vulkan-tools
56 qtbase
57 qtcharts
58 qtquickcontrols2
59 qtsvg
60 qttools
61 qtxmlpatterns
62 quazip
63 ];
64
65 cmakeFlags = [
66 "-DWITH_PCI_IDS_PATH=${hwdata}/share/hwdata/pci.ids"
67 "-DINSTALL_DBUS_FILES_IN_PREFIX=true"
68 "-DPOLKIT_POLICY_INSTALL_DIR=${placeholder "out"}/share/polkit-1/actions"
69 ];
70
71 runtimeDeps = [ hwdata glxinfo vulkan-tools util-linux procps ];
72 binPath = lib.makeBinPath runtimeDeps;
73
74 dontWrapQtApps = true;
75
76 postInstall = ''
77 wrapQtApp $out/bin/corectrl --prefix PATH ":" ${binPath}
78 '';
79
80 meta = with lib; {
81 homepage = "https://gitlab.com/corectrl/corectrl/";
82 description = "Control your computer hardware via application profiles";
83 longDescription = ''
84 CoreCtrl is a Free and Open Source GNU/Linux application that allows you
85 to control with ease your computer hardware using application profiles. It
86 aims to be flexible, comfortable and accessible to regular users.
87 '';
88 license = licenses.gpl3Plus;
89 platforms = platforms.linux;
90 };
91}
92# TODO: report upstream that libdrm is not detected at configure time