+/config
my dotfiles and nix configuration
git clone https://git.julia.blue/+/config
a5eac97
main
1{ lib , python311 , fetchFromGitHub , python311Packages , fetchPypi } : 2 3python311 . pkgs . buildPythonApplication rec { 4pname = "basic-pitch" ; 5version = "2025-01-17" ; 6pyproject = true ; 7 8src = fetchFromGitHub { 9owner = "spotify" ; 10repo = pname ; 11rev = "f423902aba4b25b4ec80ffa9848b2ad141092a6a" ; 12hash = "sha256-tqjFmRABVMOsC1eogPlzogj9hdYMWDJIgnX1pNse+NY=" ; 13}; 14 15build-system = with python311 . pkgs ; [ 16cython 17setuptools 18wheel 19]; 20 21dependencies = let 22pretty-midi = python311Packages . buildPythonPackage rec { 23pname = "pretty_midi" ; 24version = "0.2.10" ; 25src = fetchPypi { 26inherit pname version ; 27sha256 = "sha256-6m4ZL5QERnToMzNuofQVMY3fKOMgMCrHsQnt/w1FNL0=" ; 28}; 29}; 30tflite-runtime = python311Packages . buildPythonPackage rec { 31pname = "tflite-runtime" ; 32version = "2.14.0" ; 33src = fetchPypi { 34inherit pname version ; 35sha256 = "" ; 36}; 37}; 38 39in with python311 . pkgs ; [ 40# coremltools 41librosa 42mir-eval 43numpy 44onnxruntime 45pretty-midi 46resampy 47scikit-learn 48scipy 49tensorflow # tensorflow-macos 50tflite-runtime 51typing-extensions 52]; 53 54optional-dependencies = with python311 . pkgs ; { 55data = [ 56apache-beam 57basic-pitch 58ffmpeg-python 59mirdata 60smart-open 61sox 62]; 63onnx = [ onnxruntime ]; 64test = [ basic-pitch coverage mido pytest pytest-mock wave ]; 65tf = [ tensorflow ]; #tensorflow-macos 66# coreml = [ coremltools ]; 67}; 68 69pythonImportsCheck = [ "basic_pitch" ]; 70 71meta = { 72description = "A lightweight yet powerful audio-to-MIDI converter with pitch bend detection" ; 73homepage = "https://github.com/spotify/basic-pitch" ; 74license = lib . licenses . asl20 ; 75broken = true ; 76platforms = [ "x86_64-linux" ]; # need coremltools for darwin support 77}; 78}