about summary refs log tree commit diff
path: root/pkgs/by-name/pi/pianotrans/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/pi/pianotrans/package.nix')
-rw-r--r--pkgs/by-name/pi/pianotrans/package.nix40
1 files changed, 40 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 000000000000..d36fffb0c990
--- /dev/null
+++ b/pkgs/by-name/pi/pianotrans/package.nix
@@ -0,0 +1,40 @@
+{ 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";
+    mainProgram = "pianotrans";
+    homepage = "https://github.com/azuwis/pianotrans";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azuwis ];
+  };
+}