Unverified Commit fc920a28 authored by Maciej Krüger's avatar Maciej Krüger Committed by GitHub
Browse files

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

parents c47159b1 cc61a44b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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";
+32 −0
Original line number Diff line number Diff line
{
  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 −0
Original line number Diff line number Diff line
{
  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 −0
Original line number Diff line number Diff line
@@ -10292,6 +10292,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 { };