mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 13:05:08 +00:00
Merge pull request #206404 from fgaz/openrgb-plugin-hardwaresync/init
This commit is contained in:
commit
bbe2cf62a8
59
pkgs/applications/misc/openrgb-plugins/effects/default.nix
Normal file
59
pkgs/applications/misc/openrgb-plugins/effects/default.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, qtbase
|
||||
, openrgb
|
||||
, glib
|
||||
, openal
|
||||
, qmake
|
||||
, pkg-config
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openrgb-plugin-effects";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "OpenRGBDevelopers";
|
||||
repo = "OpenRGBEffectsPlugin";
|
||||
rev = "release_${version}";
|
||||
hash = "sha256-2F6yeLWgR0wCwIj75+d1Vdk45osqYwRdenK21lcRoOg=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add install rule
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.com/OpenRGBDevelopers/OpenRGBEffectsPlugin/-/commit/75f1b3617d9cabfb3b04a7afc75ce0c1b8514bc0.patch";
|
||||
hash = "sha256-X+zMNE3OCZNmUb68S4683r/RbE+CDrI/Jv4BMWPI47E=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Use the source of openrgb from nixpkgs instead of the submodule
|
||||
rm -r OpenRGB
|
||||
ln -s ${openrgb.src} OpenRGB
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
qmake
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
glib
|
||||
openal
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.com/OpenRGBDevelopers/OpenRGBEffectsPlugin";
|
||||
description = "An effects plugin for OpenRGB";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, qtbase
|
||||
, openrgb
|
||||
, glib
|
||||
, libgtop
|
||||
, lm_sensors
|
||||
, qmake
|
||||
, pkg-config
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openrgb-plugin-hardwaresync";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "OpenRGBDevelopers";
|
||||
repo = "OpenRGBHardwareSyncPlugin";
|
||||
rev = "release_${version}";
|
||||
hash = "sha256-P+IitP8pQLUkBdMfcNw4fOggqyFfg6lNlnSfUGjddzo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "use-pkgconfig";
|
||||
url = "https://gitlab.com/OpenRGBDevelopers/OpenRGBHardwareSyncPlugin/-/commit/df2869d679ea43119fb9b174cd0b2cb152022685.patch";
|
||||
hash = "sha256-oBtrHwpvB8Z3xYi4ucDSuw+5WijPEbgBW7vLGELFjfw=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "add-install-rule";
|
||||
url = "https://gitlab.com/OpenRGBDevelopers/OpenRGBHardwareSyncPlugin/-/commit/bfbaa0a32ed05112e0cc8b6b2a8229945596e522.patch";
|
||||
hash = "sha256-76UMMzeXnyQRCEE1tGPNR5XSHTT480rQDnJ9hWhfIqY=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Use the source of openrgb from nixpkgs instead of the submodule
|
||||
rmdir OpenRGB
|
||||
ln -s ${openrgb.src} OpenRGB
|
||||
# Remove prebuilt stuff
|
||||
rm -r dependencies/lhwm-cpp-wrapper
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
glib
|
||||
libgtop
|
||||
lm_sensors
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
qmake
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.com/OpenRGBDevelopers/OpenRGBHardwareSyncPlugin";
|
||||
description = "Sync your ARGB devices colors with hardware measures (CPU, GPU, fan speed, etc...)";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitLab, qmake, wrapQtAppsHook, libusb1, hidapi, pkg-config, coreutils, mbedtls_2, qtbase, qttools }:
|
||||
{ lib, stdenv, fetchFromGitLab, qmake, wrapQtAppsHook, libusb1, hidapi, pkg-config, coreutils, mbedtls_2, qtbase, qttools, symlinkJoin, openrgb }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openrgb";
|
||||
@ -25,6 +25,29 @@ stdenv.mkDerivation rec {
|
||||
HOME=$TMPDIR $out/bin/openrgb --help > /dev/null
|
||||
'';
|
||||
|
||||
passthru.withPlugins = plugins:
|
||||
let pluginsDir = symlinkJoin {
|
||||
name = "openrgb-plugins";
|
||||
paths = plugins;
|
||||
# Remove all library version symlinks except one,
|
||||
# or they will result in duplicates in the UI.
|
||||
# We leave the one pointing to the actual library, usually the most
|
||||
# qualified one (eg. libOpenRGBHardwareSyncPlugin.so.1.0.0).
|
||||
postBuild = ''
|
||||
for f in $out/lib/*; do
|
||||
if [ "$(dirname $(readlink "$f"))" == "." ]; then
|
||||
rm "$f"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
};
|
||||
in openrgb.overrideAttrs (old: {
|
||||
qmakeFlags = old.qmakeFlags or [] ++ [
|
||||
# Welcome to Escape Hell, we have backslashes
|
||||
''DEFINES+=OPENRGB_EXTRA_PLUGIN_DIRECTORY=\\\""${lib.escape ["\\" "\"" " "] (toString pluginsDir)}/lib\\\""''
|
||||
];
|
||||
});
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open source RGB lighting control";
|
||||
homepage = "https://gitlab.com/CalcProgrammer1/OpenRGB";
|
||||
|
@ -10476,6 +10476,15 @@ with pkgs;
|
||||
|
||||
openrgb = libsForQt5.callPackage ../applications/misc/openrgb { };
|
||||
|
||||
openrgb-with-all-plugins = openrgb.withPlugins [
|
||||
openrgb-plugin-effects
|
||||
openrgb-plugin-hardwaresync
|
||||
];
|
||||
|
||||
openrgb-plugin-effects = libsForQt5.callPackage ../applications/misc/openrgb-plugins/effects { };
|
||||
|
||||
openrgb-plugin-hardwaresync = libsForQt5.callPackage ../applications/misc/openrgb-plugins/hardwaresync { };
|
||||
|
||||
openrussian-cli = callPackage ../misc/openrussian-cli {
|
||||
lua = lua5_3;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user