diff options
author | Zhong Jianxin <azuwis@gmail.com> | 2023-11-25 09:59:42 +0800 |
---|---|---|
committer | Zhong Jianxin <azuwis@gmail.com> | 2023-11-25 10:07:52 +0800 |
commit | 2d60e17c28ae9c83189d83d8296ddb9675a1be21 (patch) | |
tree | 3652eaaa9ba220d794aed60f5a73ad2bd5ecb7a0 /pkgs/by-name/pi | |
parent | 3f21a22b5aafefa1845dec6f4a378a8f53d8681c (diff) |
pianotrans: add missing resampy dependency
librosa 0.10 makes `resampy` optional, from https://librosa.org/doc/0.10.0/generated/librosa.resample.html: > samplerate and resampy are not installed with librosa. To use samplerate or resampy, they should be installed manually
Diffstat (limited to 'pkgs/by-name/pi')
-rw-r--r-- | pkgs/by-name/pi/pianotrans/package.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/by-name/pi/pianotrans/package.nix b/pkgs/by-name/pi/pianotrans/package.nix new file mode 100644 index 0000000000000..1c493bc87c685 --- /dev/null +++ b/pkgs/by-name/pi/pianotrans/package.nix @@ -0,0 +1,39 @@ +{ lib +, fetchFromGitHub +, python3 +, ffmpeg +}: + +python3.pkgs.buildPythonApplication rec { + pname = "pianotrans"; + version = "1.0.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "azuwis"; + repo = pname; + rev = "v${version}"; + hash = "sha256-gRbyUQmPtGvx5QKAyrmeJl0stp7hwLBWwjSbJajihdE="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + piano-transcription-inference + resampy + tkinter + torch + ]; + + # Project has no tests + doCheck = false; + + makeWrapperArgs = [ + ''--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}"'' + ]; + + meta = with lib; { + description = "Simple GUI for ByteDance's Piano Transcription with Pedals"; + homepage = "https://github.com/azuwis/pianotrans"; + license = licenses.mit; + maintainers = with maintainers; [ azuwis ]; + }; +} |