diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2022-01-02 11:55:27 -0500 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2022-01-06 13:18:27 -0500 |
commit | b1cf1d44f402cef3fccbb37277554bc7d5dd27d4 (patch) | |
tree | d8c1032fcb7144cd16b3a4c4269bfc9bff280240 | |
parent | fb8568857fbbfc46c01c47099da364639ca69d88 (diff) | |
download | guix-b1cf1d44f402cef3fccbb37277554bc7d5dd27d4.tar.gz |
gnu: Add openrgb.
* gnu/packages/hardware.scm (openrgb): New variable. * gnu/packages/patches/openrgb-unbundle-hueplusplus.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari <leo@famulari.name>
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/hardware.scm | 73 | ||||
-rw-r--r-- | gnu/packages/patches/openrgb-unbundle-hueplusplus.patch | 58 |
3 files changed, 132 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 4ac9036038..560a632f44 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1560,6 +1560,7 @@ dist_patch_DATA = \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openresolv-restartcmd-guix.patch \ + %D%/packages/patches/openrgb-unbundle-hueplusplus.patch \ %D%/packages/patches/opensles-add-license-file.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index 5ba7a5e9ec..8727f0f20a 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -65,6 +65,7 @@ #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module ((guix licenses) #:prefix license:) @@ -650,6 +651,78 @@ be dangerous and may void your CPU or system board's warranty.") technology, such as head mounted displays with built in head tracking.") (license license:boost1.0))) +(define-public openrgb + (package + (name "openrgb") + (version "0.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/CalcProgrammer1/OpenRGB") + (commit (string-append "release_" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xhfaz0b74nfnh7il2cz5c0338xlzay00g6hc2h3lsncarj8d5n7")) + (patches + (search-patches "openrgb-unbundle-hueplusplus.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete the bundled hueplusplus and json libraries. + (delete-file-recursively "dependencies/hueplusplus-1.0.0") + (delete-file-recursively "dependencies/json"))))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ; doesn't have tests + #:make-flags + #~(list (string-append "INSTALL_ROOT=" #$output )) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unbundle + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "OpenRGB.pro" + (("dependencies/hueplusplus-1.0.0/include/hueplusplus") + (string-append #$(this-package-input "hueplusplus") + "/include/hueplusplus")) + (("dependencies/json") + (string-append #$(this-package-input "json-modern-cxx") + "/include/nlohmann"))))) + ;; Call qmake instead of configure to create a Makefile. + (replace 'configure + (lambda _ (invoke "qmake" "PREFIX=/" "OpenRGB.pro")))))) + (inputs + (list hidapi + hueplusplus + json-modern-cxx + libusb + mbedtls-apache + qtbase-5)) + (native-inputs + (list pkg-config)) + (synopsis "RGB lighting control") + (description + "OpenRGB is lighting control that doesn't depend on manufacturer software. +ASUS, ASRock, Corsair, G.Skill, Gigabyte, HyperX, MSI, Razer, ThermalTake, and more +supported. + +Features: + +@itemize +@item Set colors and select effect modes for a wide variety of RGB hardware +@item Save and load profiles +@item Control lighting from third party software using the OpenRGB SDK +@item Command line interface +@item Connect multiple instances of OpenRGB to synchronize lighting across multiple PCs +@item Can operate standalone or in a client/headless server configuration +@item View device information +@item No official/manufacturer software required +@item Graphical view of device LEDs makes creating custom patterns easy +@end itemize") + (home-page "https://openrgb.org/") + (license license:gpl2))) ; Included libccmmk is lgpl3+, CRC is bsd-3 + (define-public wavemon (package (name "wavemon") diff --git a/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch b/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch new file mode 100644 index 0000000000..7454e1efbe --- /dev/null +++ b/gnu/packages/patches/openrgb-unbundle-hueplusplus.patch @@ -0,0 +1,58 @@ +Remove references to hueplusplus in order to unbundle and use the input package. + +diff --git a/OpenRGB.pro b/OpenRGB.pro +index 61758892..8702d998 100644 +--- a/OpenRGB.pro ++++ b/OpenRGB.pro +@@ -493,35 +493,6 @@ SOURCES += + dependencies/Swatches/swatches.cpp \ + dependencies/dmiinfo.cpp \ + dependencies/ColorWheel/ColorWheel.cpp \ +- dependencies/hueplusplus-1.0.0/src/Action.cpp \ +- dependencies/hueplusplus-1.0.0/src/APICache.cpp \ +- dependencies/hueplusplus-1.0.0/src/BaseDevice.cpp \ +- dependencies/hueplusplus-1.0.0/src/BaseHttpHandler.cpp \ +- dependencies/hueplusplus-1.0.0/src/Bridge.cpp \ +- dependencies/hueplusplus-1.0.0/src/BridgeConfig.cpp \ +- dependencies/hueplusplus-1.0.0/src/CLIPSensors.cpp \ +- dependencies/hueplusplus-1.0.0/src/ColorUnits.cpp \ +- dependencies/hueplusplus-1.0.0/src/EntertainmentMode.cpp \ +- dependencies/hueplusplus-1.0.0/src/ExtendedColorHueStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/ExtendedColorTemperatureStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/Group.cpp \ +- dependencies/hueplusplus-1.0.0/src/HueCommandAPI.cpp \ +- dependencies/hueplusplus-1.0.0/src/HueDeviceTypes.cpp \ +- dependencies/hueplusplus-1.0.0/src/HueException.cpp \ +- dependencies/hueplusplus-1.0.0/src/Light.cpp \ +- dependencies/hueplusplus-1.0.0/src/ModelPictures.cpp \ +- dependencies/hueplusplus-1.0.0/src/NewDeviceList.cpp \ +- dependencies/hueplusplus-1.0.0/src/Scene.cpp \ +- dependencies/hueplusplus-1.0.0/src/Schedule.cpp \ +- dependencies/hueplusplus-1.0.0/src/Sensor.cpp \ +- dependencies/hueplusplus-1.0.0/src/SimpleBrightnessStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/SimpleColorHueStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/SimpleColorTemperatureStrategy.cpp \ +- dependencies/hueplusplus-1.0.0/src/StateTransaction.cpp \ +- dependencies/hueplusplus-1.0.0/src/TimePattern.cpp \ +- dependencies/hueplusplus-1.0.0/src/UPnP.cpp \ +- dependencies/hueplusplus-1.0.0/src/Utils.cpp \ +- dependencies/hueplusplus-1.0.0/src/ZLLSensors.cpp \ + dependencies/libe131/src/e131.c \ + dependencies/libcmmk/src/libcmmk.c \ + main.cpp \ +@@ -1188,6 +1159,7 @@ unix:!macx { + -lmbedx509 \ + -lmbedtls \ + -lmbedcrypto \ ++ -lhueplusplusshared \ + + COMPILER_VERSION = $$system($$QMAKE_CXX " -dumpversion") + if (!versionAtLeast(COMPILER_VERSION, "9")) { +@@ -1218,7 +1190,6 @@ unix:!macx { + } + + SOURCES += \ +- dependencies/hueplusplus-1.0.0/src/LinHttpHandler.cpp \ + i2c_smbus/i2c_smbus_linux.cpp \ + serial_port/find_usb_serial_port_linux.cpp \ + AutoStart/AutoStart-Linux.cpp \ |