2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-10-15 01:05:19 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, extra-cmake-modules
|
|
|
|
, botan2
|
|
|
|
, karchive
|
|
|
|
, kauth
|
|
|
|
, libdrm
|
2021-05-16 00:57:38 +00:00
|
|
|
, hwdata
|
2021-12-23 21:29:23 +00:00
|
|
|
, glxinfo
|
2022-10-22 14:45:51 +00:00
|
|
|
, polkit
|
2020-10-15 01:05:19 +00:00
|
|
|
, procps
|
2020-11-24 15:29:28 +00:00
|
|
|
, util-linux
|
2020-10-15 01:05:19 +00:00
|
|
|
, vulkan-tools
|
|
|
|
, qtbase
|
|
|
|
, qtcharts
|
|
|
|
, qtquickcontrols2
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, qtxmlpatterns
|
2022-10-22 14:45:51 +00:00
|
|
|
, quazip
|
2020-10-15 01:05:19 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
} :
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec{
|
|
|
|
pname = "corectrl";
|
2022-10-22 14:45:51 +00:00
|
|
|
version = "1.3.1";
|
2020-10-15 01:05:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "corectrl";
|
|
|
|
repo = "corectrl";
|
|
|
|
rev = "v${version}";
|
2022-10-22 14:45:51 +00:00
|
|
|
sha256 = "sha256-mVMyXpNhwljxsAvrKeHPxUSfdF/mfxG157T13Kb8PnE=";
|
2020-10-15 01:05:19 +00:00
|
|
|
};
|
2022-10-22 14:45:51 +00:00
|
|
|
patches = [
|
|
|
|
./polkit-dir.patch
|
|
|
|
];
|
2020-10-15 01:05:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
extra-cmake-modules
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
botan2
|
|
|
|
karchive
|
|
|
|
kauth
|
|
|
|
libdrm
|
2021-12-23 21:29:23 +00:00
|
|
|
glxinfo
|
2022-10-22 14:45:51 +00:00
|
|
|
polkit
|
2020-10-15 01:05:19 +00:00
|
|
|
procps
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux
|
2020-10-15 01:05:19 +00:00
|
|
|
vulkan-tools
|
|
|
|
qtbase
|
|
|
|
qtcharts
|
|
|
|
qtquickcontrols2
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtxmlpatterns
|
2022-10-22 14:45:51 +00:00
|
|
|
quazip
|
2020-10-15 01:05:19 +00:00
|
|
|
];
|
|
|
|
|
2022-10-22 14:45:51 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_PCI_IDS_PATH=${hwdata}/share/hwdata/pci.ids"
|
|
|
|
"-DINSTALL_DBUS_FILES_IN_PREFIX=true"
|
|
|
|
"-DPOLKIT_POLICY_INSTALL_DIR=${placeholder "out"}/share/polkit-1/actions"
|
|
|
|
];
|
2021-05-16 00:57:38 +00:00
|
|
|
|
2021-12-23 21:29:23 +00:00
|
|
|
runtimeDeps = [ hwdata glxinfo vulkan-tools util-linux procps ];
|
2021-01-15 05:42:41 +00:00
|
|
|
binPath = lib.makeBinPath runtimeDeps;
|
2020-10-15 01:05:19 +00:00
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapQtApp $out/bin/corectrl --prefix PATH ":" ${binPath}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-15 01:05:19 +00:00
|
|
|
homepage = "https://gitlab.com/corectrl/corectrl/";
|
|
|
|
description = "Control your computer hardware via application profiles";
|
|
|
|
longDescription = ''
|
|
|
|
CoreCtrl is a Free and Open Source GNU/Linux application that allows you
|
|
|
|
to control with ease your computer hardware using application profiles. It
|
|
|
|
aims to be flexible, comfortable and accessible to regular users.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
# TODO: report upstream that libdrm is not detected at configure time
|