From cc61a44bf9aa918b6ae86735396f6193963648b2 Mon Sep 17 00:00:00 2001 From: Alberto Barradas Date: Mon, 21 Oct 2024 18:53:12 +0200 Subject: [PATCH] python3.pkgs.pylsl: init at 1.16.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update pkgs/development/python-modules/pylsl/default.nix Co-authored-by: Maciej Krüger --- .../python-modules/pylsl/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/pylsl/default.nix diff --git a/pkgs/development/python-modules/pylsl/default.nix b/pkgs/development/python-modules/pylsl/default.nix new file mode 100644 index 0000000000000..f58a67956e36a --- /dev/null +++ b/pkgs/development/python-modules/pylsl/default.nix @@ -0,0 +1,43 @@ +{ + lib, + liblsl, + fetchFromGitHub, + buildPythonPackage, + setuptools, + wheel, +}: + +buildPythonPackage rec { + pname = "pylsl"; + version = "1.16.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "labstreaminglayer"; + repo = "pylsl"; + rev = "v${version}"; + hash = "sha256-rReoPirf1rdQppKEBfHMk3J2htdsnFfIdlNQIprOoUg="; + }; + + postPatch = '' + substituteInPlace pylsl/pylsl.py \ + --replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.so'")" + ''; + + nativeBuildInputs = [ + setuptools + wheel + ]; + + buildImputs = [ liblsl ]; + + pythonImportsCheck = [ "pylsl" ]; + + meta = with lib; { + description = "Python bindings (pylsl) for liblsl"; + homepage = "https://github.com/labstreaminglayer/pylsl"; + license = licenses.mit; + maintainers = with maintainers; [ abcsds ]; + mainProgram = "pylsl"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index edde228999dde..e62b76bd072f5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10264,6 +10264,8 @@ self: super: with self; { pyloadapi = callPackage ../development/python-modules/pyloadapi { }; + pylsl = callPackage ../development/python-modules/pylsl { }; + pyngo = callPackage ../development/python-modules/pyngo { }; pyngrok = callPackage ../development/python-modules/pyngrok { };