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