Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at r-updates 84 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 poetry-core, 7 pythonOlder, 8 numpy, 9 deprecation, 10 hightime, 11 tzlocal, 12 python-decouple, 13 click, 14 distro, 15 requests, 16 sphinx, 17 sphinx-rtd-theme, 18 grpcio, 19 protobuf, 20 toml, 21}: 22 23buildPythonPackage rec { 24 pname = "nidaqmx"; 25 version = "1.2.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "ni"; 30 repo = "nidaqmx-python"; 31 tag = version; 32 hash = "sha256-uxf+1nmJ+YFS3zGu+0YP4zOdBlSCHPYC8euqZIGwb00="; 33 }; 34 35 disabled = pythonOlder "3.8"; 36 37 build-system = [ poetry-core ]; 38 39 prePatch = '' 40 substituteInPlace pyproject.toml \ 41 --replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api' 42 43 substituteInPlace pyproject.toml \ 44 --replace-fail '["poetry>=1.2"]' '["poetry-core>=1.0.0"]' 45 ''; 46 47 dependencies = [ 48 numpy 49 deprecation 50 hightime 51 tzlocal 52 python-decouple 53 click 54 requests 55 ] 56 ++ lib.optionals stdenv.hostPlatform.isLinux [ 57 distro 58 ]; 59 60 passthru.optional-dependencies = { 61 docs = [ 62 sphinx 63 sphinx-rtd-theme 64 toml 65 ]; 66 grpc = [ 67 grpcio 68 protobuf 69 ]; 70 }; 71 72 # Tests require hardware 73 doCheck = false; 74 75 pythonImportsCheck = [ "nidaqmx" ]; 76 77 meta = { 78 changelog = "https://github.com/ni/nidaqmx-python/releases/tag/${src.tag}"; 79 description = "API for interacting with the NI-DAQmx driver"; 80 homepage = "https://github.com/ni/nidaqmx-python"; 81 license = lib.licenses.mit; 82 maintainers = with lib.maintainers; [ fsagbuya ]; 83 }; 84}