about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-04-28 21:37:24 +0200
committerGitHub <noreply@github.com>2023-04-28 21:37:24 +0200
commitcd975dc76af4799059d340123c1da8bb14e947fe (patch)
treed13f1393d427c1ac1b6742ea608c0228911e6636
parentb36139a93fce0b06061c2be729e6df24587d8a90 (diff)
parent4d057d14ba766b516d8f585b66dbfe8c00cd0d53 (diff)
Merge pull request #226211 from SuperSandro2000/ledfx
-rw-r--r--pkgs/applications/audio/ledfx/default.nix73
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 75 insertions, 0 deletions
diff --git a/pkgs/applications/audio/ledfx/default.nix b/pkgs/applications/audio/ledfx/default.nix
new file mode 100644
index 0000000000000..507ce0d9a7679
--- /dev/null
+++ b/pkgs/applications/audio/ledfx/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, fetchpatch
+, python3
+}:
+
+python3.pkgs.buildPythonPackage rec {
+  pname = "ledfx";
+  version = "2.0.64";
+  format = "setuptools";
+
+  src = python3.pkgs.fetchPypi {
+    inherit pname version;
+    hash = "sha256-TKRa4PcMd0Jl94XD2WubOhmsxZaUplZeWKsuKz83Rl4=";
+  };
+
+  patches = [
+    # replace tcp-latency which is not packaged with icmplib
+    (fetchpatch {
+      url = "https://github.com/LedFx/LedFx/commit/98cd4256846ae3bdae7094eeacb3b02a4807dc6f.patch";
+      excludes = [
+        # only used in win.spec file which is windows specific
+        "hiddenimports.py"
+      ];
+      hash = "sha256-p9fiLdjZI5fe5Qy2xbJIAtblp/7BwUxAvwjHQy5l9nQ=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace '"openrgb-python~=0.2.10",' "" \
+      --replace '"pyupdater>=3.1.0",' "" \
+      --replace "'rpi-ws281x>=4.3.0; platform_system == \"Linux\"'," "" \
+      --replace "~=" ">="
+  '';
+
+  propagatedBuildInputs = with python3.pkgs; [
+    aiohttp
+    aiohttp-cors
+    aubio
+    certifi
+    cython
+    flux-led
+    icmplib
+    multidict
+    numpy
+    # openrgb-python # not packaged
+    paho-mqtt
+    pillow
+    psutil
+    pyserial
+    pystray
+    # rpi-ws281x # not packaged
+    requests
+    sacn
+    samplerate
+    sentry-sdk
+    sounddevice
+    uvloop
+    voluptuous
+    zeroconf
+  ];
+
+  # has no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "LedFx is a network based LED effect controller with support for advanced real-time audio effects";
+    homepage = "https://github.com/LedFx/LedFx";
+    changelog = "https://github.com/LedFx/LedFx/blob/${version}/CHANGELOG.rst";
+    license = licenses.gpl3Only;
+    maintainers = teams.c3d2.members;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 43d13b2a3d6fd..c01724ec2ea59 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1367,6 +1367,8 @@ with pkgs;
     wine = null;
   };
 
+  ledfx = callPackage ../applications/audio/ledfx { };
+
   libdislocator = callPackage ../tools/security/afl/libdislocator.nix { };
 
   afpfs-ng = callPackage ../tools/filesystems/afpfs-ng { };