at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 cython, 8 numpy, 9 setuptools, 10 11 # tests 12 pytestCheckHook, 13}: 14 15buildPythonPackage rec { 16 pname = "pyedflib"; 17 version = "0.1.42"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "holgern"; 22 repo = "pyedflib"; 23 tag = "v${version}"; 24 hash = "sha256-KbySCsDjiS94U012KASRgHR2fuX090HlKUuPgsLC+xQ="; 25 }; 26 27 build-system = [ 28 cython 29 numpy 30 setuptools 31 ]; 32 33 pythonImportsCheck = [ 34 "pyedflib" 35 ]; 36 37 # Otherwise, the module is imported from source and lacks the compiled artifacts 38 # By moving to the pyedflib directory, python imports the installed package instead of the module 39 # from the local files 40 preCheck = '' 41 cd pyedflib 42 ''; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 ]; 47 48 meta = { 49 description = "Python library to read/write EDF+/BDF+ files based on EDFlib"; 50 homepage = "https://github.com/holgern/pyedflib"; 51 changelog = "https://github.com/holgern/pyedflib/releases/tag/${src.tag}"; 52 license = lib.licenses.bsd3; 53 maintainers = with lib.maintainers; [ GaetanLepage ]; 54 }; 55}