corectrl: modernize

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2024-10-29 18:24:23 +01:00
parent 68ff98fb84
commit 804ba7d9d9
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951

View File

@ -1,49 +1,42 @@
{ lib, stdenv
, fetchFromGitLab
, extra-cmake-modules
, botan3
, libdrm
, hwdata
, mesa-demos
, polkit
, procps
, pugixml
, spdlog
, util-linux
, vulkan-tools
, libsForQt5
} :
{
botan3,
extra-cmake-modules,
fetchFromGitLab,
hwdata,
lib,
libdrm,
libsForQt5,
mesa-demos,
polkit,
procps,
pugixml,
spdlog,
stdenv,
util-linux,
vulkan-tools,
}:
stdenv.mkDerivation rec{
stdenv.mkDerivation (finalAttrs: {
pname = "corectrl";
version = "1.4.2";
src = fetchFromGitLab {
owner = "corectrl";
repo = "corectrl";
rev = "v${version}";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-WOljOakh177om7tLlroFwWO4gYsarfTCeVXX6+dmZs4=";
};
patches = [
./polkit-dir.patch
];
nativeBuildInputs = [
extra-cmake-modules
libsForQt5.wrapQtAppsHook
];
buildInputs = [
botan3
libdrm # TODO: report upstream that libdrm is not detected at configure time
libsForQt5.karchive
libsForQt5.kauth
libdrm
mesa-demos
polkit
procps
pugixml
spdlog
util-linux
vulkan-tools
libsForQt5.qtbase
libsForQt5.qtcharts
libsForQt5.qtquickcontrols2
@ -51,24 +44,38 @@ stdenv.mkDerivation rec{
libsForQt5.qttools
libsForQt5.qtxmlpatterns
libsForQt5.quazip
mesa-demos
polkit
procps
pugixml
spdlog
util-linux
vulkan-tools
];
patches = [
./polkit-dir.patch
];
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"
"-DWITH_PCI_IDS_PATH=${hwdata}/share/hwdata/pci.ids"
];
runtimeDeps = [ hwdata mesa-demos vulkan-tools util-linux procps ];
binPath = lib.makeBinPath runtimeDeps;
runtimeInputs = [
hwdata
mesa-demos
procps
util-linux
vulkan-tools
];
dontWrapQtApps = true;
qrWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath finalAttrs.runtimeInputs}"
];
postInstall = ''
wrapQtApp $out/bin/corectrl --prefix PATH ":" ${binPath}
'';
meta = with lib; {
meta = {
homepage = "https://gitlab.com/corectrl/corectrl/";
description = "Control your computer hardware via application profiles";
longDescription = ''
@ -76,9 +83,8 @@ stdenv.mkDerivation rec{
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;
maintainers = with maintainers; [ Scrumplex ];
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ Scrumplex ];
};
}
# TODO: report upstream that libdrm is not detected at configure time
})