at master 1.1 kB view raw
1{ 2 lib, 3 liblsl, 4 fetchFromGitHub, 5 buildPythonPackage, 6 stdenv, 7 numpy, 8 setuptools, 9 setuptools-scm, 10 wheel, 11}: 12 13buildPythonPackage rec { 14 pname = "pylsl"; 15 version = "1.17.6"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "labstreaminglayer"; 20 repo = "pylsl"; 21 tag = "v${version}"; 22 hash = "sha256-PEeTG+bQNEce9j0obDoaTYXMGp0MRUibbWVXM1IvGGY="; 23 }; 24 25 postPatch = '' 26 substituteInPlace src/pylsl/lib/__init__.py \ 27 --replace "def find_liblsl_libraries(verbose=False):" "$(echo -e "def find_liblsl_libraries(verbose=False):\n yield '${liblsl}/lib/liblsl.${ 28 if stdenv.hostPlatform.isDarwin then "dylib" else "so" 29 }'")" 30 ''; 31 32 build-system = [ 33 setuptools 34 setuptools-scm 35 wheel 36 ]; 37 38 dependencies = [ 39 liblsl 40 numpy 41 ]; 42 43 pythonImportsCheck = [ "pylsl" ]; 44 45 meta = with lib; { 46 description = "Python bindings (pylsl) for liblsl"; 47 homepage = "https://github.com/labstreaminglayer/pylsl"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ abcsds ]; 50 }; 51}