@@ -0,0 +1,74 @@
1+{ stdenv
2+, fetchFromGitLab
3+, extra-cmake-modules
4+, botan2
5+, karchive
6+, kauth
7+, libdrm
8+, mesa-demos
9+, procps
10+, utillinux
11+, vulkan-tools
12+, qtbase
13+, qtcharts
14+, qtquickcontrols2
15+, qtsvg
16+, qttools
17+, qtxmlpatterns
18+, wrapQtAppsHook
19+} :
20+
21+stdenv.mkDerivation rec{
22+ pname = "corectrl";
23+ version = "1.1.1";
24+
25+ src = fetchFromGitLab {
26+ owner = "corectrl";
27+ repo = "corectrl";
28+ rev = "v${version}";
29+ sha256 = "sha256-YQDrxPqCa3OzNKd3UiAffqqvOrgbXmDFJGjYPetolyY=";
30+ };
31+
32+ nativeBuildInputs = [
33+ extra-cmake-modules
34+ wrapQtAppsHook
35+ ];
36+ buildInputs = [
37+ botan2
38+ karchive
39+ kauth
40+ libdrm
41+ mesa-demos
42+ procps
43+ utillinux
44+ vulkan-tools
45+ qtbase
46+ qtcharts
47+ qtquickcontrols2
48+ qtsvg
49+ qttools
50+ qtxmlpatterns
51+ ];
52+
53+ runtimeDeps = [ mesa-demos vulkan-tools ];
54+ binPath = stdenv.lib.makeBinPath runtimeDeps;
55+
56+ dontWrapQtApps = true;
57+
58+ postInstall = ''
59+ wrapQtApp $out/bin/corectrl --prefix PATH ":" ${binPath}
60+ '';
61+
62+ meta = with stdenv.lib; {
63+ homepage = "https://gitlab.com/corectrl/corectrl/";
64+ description = "Control your computer hardware via application profiles";
65+ longDescription = ''
66+ CoreCtrl is a Free and Open Source GNU/Linux application that allows you
67+ to control with ease your computer hardware using application profiles. It
68+ aims to be flexible, comfortable and accessible to regular users.
69+ '';
70+ license = licenses.gpl3Plus;
71+ platforms = platforms.linux;
72+ };
73+}
74+# TODO: report upstream that libdrm is not detected at configure time