Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liblsl and python3.pkgs.pylsl: init at 1.16.2 #350286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@
githubId = 1174810;
name = "Nikolay Amiantov";
};
abcsds = {
email = "abcsds@gmail.com";
github = "abcsds";
githubId = 2694381;
name = "Alberto Barradas";
};
abdiramen = {
email = "abdirahman.osmanthus@gmail.com";
github = "Abdiramen";
Expand Down
32 changes: 32 additions & 0 deletions pkgs/by-name/li/liblsl/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
cmake,
stdenv,
lib,
fetchFromGitHub,
}:

stdenv.mkDerivation rec {
pname = "liblsl";
version = "1.16.2";

src = fetchFromGitHub {
owner = "sccn";
repo = "liblsl";
rev = "v${version}";
sha256 = "sha256-nmu7Kxk4U5sGO8Od9JR4id4V4mjeibj4AHjUYhpGPeo=";
};

nativeBuildInputs = [ cmake ];

cmakeFlags = [ "-DLSL_UNIXFOLDERS=ON" ];

meta = {
description = "C++ lsl library for multi-modal time-synched data transmission over the local network";
homepage = "https://github.com/sccn/liblsl";
changelog = "https://github.com/sccn/liblsl/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ abcsds ];
mainProgram = "liblsl";
platforms = lib.platforms.all;
};
}
43 changes: 43 additions & 0 deletions pkgs/development/python-modules/pylsl/default.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down