From 1dc342857d9b25aecabce82f72bcca54d90e4ab7 Mon Sep 17 00:00:00 2001 From: nicoo Date: Fri, 14 Mar 2025 23:33:50 +0000 Subject: [PATCH 1/2] python3.pkgs.pysls: Fix build Broken in 1b1147e968f9c6154d54de4d21288c08e813d67b / #375144 --- pkgs/development/python-modules/pylsl/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pylsl/default.nix b/pkgs/development/python-modules/pylsl/default.nix index 249aebd5cda1..ae0fb4a4f48e 100644 --- a/pkgs/development/python-modules/pylsl/default.nix +++ b/pkgs/development/python-modules/pylsl/default.nix @@ -3,7 +3,9 @@ liblsl, fetchFromGitHub, buildPythonPackage, + numpy, setuptools, + setuptools-scm, wheel, }: @@ -20,16 +22,20 @@ buildPythonPackage rec { }; postPatch = '' - substituteInPlace pylsl/pylsl.py \ + substituteInPlace src/pylsl/lib/__init__.py \ --replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.so'")" ''; - nativeBuildInputs = [ + build-system = [ setuptools + setuptools-scm wheel ]; - buildImputs = [ liblsl ]; + dependencies = [ + liblsl + numpy + ]; pythonImportsCheck = [ "pylsl" ]; From 3b3b0b47462aea443bce9edfcb08b86aa8045695 Mon Sep 17 00:00:00 2001 From: nicoo Date: Sat, 15 Mar 2025 00:26:54 +0000 Subject: [PATCH 2/2] python3.pkgs.pysls: Fix build on Darwin --- pkgs/development/python-modules/pylsl/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pylsl/default.nix b/pkgs/development/python-modules/pylsl/default.nix index ae0fb4a4f48e..7028dfef23f3 100644 --- a/pkgs/development/python-modules/pylsl/default.nix +++ b/pkgs/development/python-modules/pylsl/default.nix @@ -3,6 +3,7 @@ liblsl, fetchFromGitHub, buildPythonPackage, + stdenv, numpy, setuptools, setuptools-scm, @@ -23,7 +24,9 @@ buildPythonPackage rec { postPatch = '' substituteInPlace src/pylsl/lib/__init__.py \ - --replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.so'")" + --replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.${ + if stdenv.hostPlatform.isDarwin then "dylib" else "so" + }'")" ''; build-system = [