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