Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 stdenv, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 numpy, 12 onnxruntime, 13 14 # tests 15 pytestCheckHook, 16}: 17 18buildPythonPackage rec { 19 pname = "pysilero-vad"; 20 version = "2.1.1"; 21 pyproject = true; 22 23 src = fetchFromGitHub { 24 owner = "rhasspy"; 25 repo = "pysilero-vad"; 26 tag = "v${version}"; 27 hash = "sha256-zxvYvPnL99yIVHrzbRbKmTazzlefOS+s2TAWLweRSYE="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 numpy 34 onnxruntime 35 ]; 36 37 nativeCheckInputs = [ pytestCheckHook ]; 38 39 pythonImportsCheck = [ "pysilero_vad" ]; 40 41 # aarch64-linux onnxruntime tries to get cpu information from /sys, which isn't available 42 # inside the nix build sandbox. 43 doCheck = stdenv.buildPlatform.system != "aarch64-linux"; 44 dontUsePythonImportsCheck = stdenv.buildPlatform.system == "aarch64-linux"; 45 46 meta = with lib; { 47 description = "Pre-packaged voice activity detector using silero-vad"; 48 homepage = "https://github.com/rhasspy/pysilero-vad"; 49 changelog = "https://github.com/rhasspy/pysilero-vad/blob/${src.tag}/CHANGELOG.md"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ hexa ]; 52 }; 53}