nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 49 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 stdenv, 6 7 # build-system 8 setuptools, 9 10 # tests 11 pytestCheckHook, 12}: 13 14buildPythonPackage (finalAttrs: { 15 pname = "pysilero-vad"; 16 version = "3.2.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "rhasspy"; 21 repo = "pysilero-vad"; 22 tag = "v${finalAttrs.version}"; 23 hash = "sha256-cqjuU5JtsL+Fp3m3uzz8flrJEyn+JDUMWsXU0Ioh87U="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 pythonImportsCheck = [ "pysilero_vad" ]; 31 32 # aarch64-linux onnxruntime tries to get cpu information from /sys, which isn't available 33 # inside the nix build sandbox. 34 #doCheck = stdenv.buildPlatform.system != "aarch64-linux"; 35 dontUsePythonImportsCheck = stdenv.buildPlatform.system == "aarch64-linux"; 36 37 preCheck = '' 38 # don't shadow the build result during tests 39 rm -rf pysilero_vad 40 ''; 41 42 meta = { 43 description = "Pre-packaged voice activity detector using silero-vad"; 44 homepage = "https://github.com/rhasspy/pysilero-vad"; 45 changelog = "https://github.com/rhasspy/pysilero-vad/blob/${finalAttrs.src.tag}/CHANGELOG.md"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ hexa ]; 48 }; 49})