about summary refs log tree commit diff
path: root/pkgs/applications/audio/whipper/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/whipper/default.nix')
-rw-r--r--pkgs/applications/audio/whipper/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/audio/whipper/default.nix b/pkgs/applications/audio/whipper/default.nix
new file mode 100644
index 000000000000..162d5459d648
--- /dev/null
+++ b/pkgs/applications/audio/whipper/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, python2, cdparanoia, cdrdao, flac
+, sox, accuraterip-checksum, utillinux, substituteAll }:
+
+python2.pkgs.buildPythonApplication rec {
+  name = "whipper-${version}";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "JoeLametta";
+    repo = "whipper";
+    rev = "v${version}";
+    sha256 = "04m8s0s9dcnly9l6id8vv99n9kbjrjid79bss52ay9yvwng0frmj";
+  };
+
+  pythonPath = with python2.pkgs; [
+    pygobject2 musicbrainzngs urllib3 chardet
+    pycdio setuptools mutagen
+    requests
+  ];
+
+  checkInputs = with python2.pkgs; [
+    twisted
+  ];
+
+  patches = [
+    (substituteAll {
+      src = ./paths.patch;
+      inherit cdrdao cdparanoia utillinux flac sox;
+      accurateripChecksum = accuraterip-checksum;
+    })
+  ];
+
+  # some tests require internet access
+  # https://github.com/JoeLametta/whipper/issues/291
+  doCheck = false;
+
+  preCheck = ''
+    HOME=$TMPDIR
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/JoeLametta/whipper;
+    description = "A CD ripper aiming for accuracy over speed";
+    maintainers = with maintainers; [ rycee jgeerds ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}