1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 librosa, 6 numpy, 7 torch, 8}: 9 10buildPythonPackage rec { 11 pname = "torchlibrosa"; 12 version = "0.1.0"; 13 format = "setuptools"; 14 15 src = fetchPypi { 16 inherit pname version; 17 hash = "sha256-Yqi+7fnJtBQaBiNN8/ECKfe6huZ2eMzuAkiexO8EQCg="; 18 }; 19 20 propagatedBuildInputs = [ 21 librosa 22 numpy 23 torch 24 ]; 25 26 # Project has no tests. 27 # In order to make pythonImportsCheck work, NUMBA_CACHE_DIR env var need to 28 # be set to a writable dir (https://github.com/numba/numba/issues/4032#issuecomment-488102702). 29 # pythonImportsCheck has no pre* hook, use checkPhase to workaround that. 30 checkPhase = '' 31 export NUMBA_CACHE_DIR="$(mktemp -d)" 32 ''; 33 pythonImportsCheck = [ "torchlibrosa" ]; 34 35 meta = with lib; { 36 description = "PyTorch implemention of part of librosa functions"; 37 homepage = "https://github.com/qiuqiangkong/torchlibrosa"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ azuwis ]; 40 }; 41}