summary refs log tree commit diff
path: root/pkgs/applications/audio/morituri
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2014-11-02 00:11:11 +0100
committerRobert Helgesson <robert@rycee.net>2014-11-07 21:26:53 +0100
commitc85b1c63df0b94c18d6acc315237f380dd7d8bde (patch)
tree97516214c90498731ded4b84fce4382347f6a44d /pkgs/applications/audio/morituri
parent442b097b0da5a4ce50872a07f99a5ceadba97b87 (diff)
downloadnixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.tar
nixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.tar.gz
nixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.tar.bz2
nixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.tar.lz
nixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.tar.xz
nixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.tar.zst
nixpkgs-c85b1c63df0b94c18d6acc315237f380dd7d8bde.zip
Add package 'morituri', a CD ripper.
Diffstat (limited to 'pkgs/applications/audio/morituri')
-rw-r--r--pkgs/applications/audio/morituri/default.nix58
-rw-r--r--pkgs/applications/audio/morituri/paths.patch12
2 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/applications/audio/morituri/default.nix b/pkgs/applications/audio/morituri/default.nix
new file mode 100644
index 00000000000..6af08cf0221
--- /dev/null
+++ b/pkgs/applications/audio/morituri/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchurl, python, pythonPackages, cdparanoia, cdrdao
+, pygobject, gst_python, gst_plugins_base, gst_plugins_good
+, setuptools, utillinux, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "morituri-${version}";
+  version = "0.2.3";
+
+  src = fetchurl {
+    url = "http://thomas.apestaart.org/download/morituri/${name}.tar.bz2";
+    sha256 = "1b30bs1y8azl04izsrl01gw9ys0lhzkn5afxi4p8qbiri2h4v210";
+  };
+
+  pythonPath = [
+    pygobject gst_python pythonPackages.musicbrainzngs
+    pythonPackages.pycdio pythonPackages.pyxdg setuptools
+  ];
+
+  buildInputs = [
+    python cdparanoia cdrdao utillinux makeWrapper
+    gst_plugins_base gst_plugins_good
+  ] ++ pythonPath;
+
+  patches = [ ./paths.patch ];
+
+  postPatch =  ''
+    substituteInPlace morituri/extern/python-command/scripts/help2man \
+      --replace /usr/bin/python ${python}/bin/python
+
+    substituteInPlace morituri/common/program.py \
+      --replace umount ${utillinux}/bin/umount \
+      --replace \'eject \'${utillinux}/bin/eject
+
+    substituteInPlace morituri/program/cdparanoia.py \
+      --replace '"cdparanoia"' '"${cdparanoia}/bin/cdparanoia"'
+
+    substituteInPlace morituri/program/cdrdao.py \
+      --replace "['cdrdao', ]" "['${cdrdao}/bin/cdrdao', ]" \
+      --replace '"cdrdao"' '"${cdrdao}/bin/cdrdao"'
+  '';
+
+  # This package contains no binaries to patch or strip.
+  dontPatchELF = true;
+  dontStrip = true;
+
+  postInstall = ''
+    wrapProgram "$out/bin/rip" \
+      --prefix PYTHONPATH : "$PYTHONPATH" \
+      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://thomas.apestaart.org/morituri/trac/;
+    description = "A CD ripper aiming for accuracy over speed";
+    maintainers = [ maintainers.rycee ];
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/morituri/paths.patch b/pkgs/applications/audio/morituri/paths.patch
new file mode 100644
index 00000000000..12f1d5b761c
--- /dev/null
+++ b/pkgs/applications/audio/morituri/paths.patch
@@ -0,0 +1,12 @@
+diff -Nurp morituri-0.2.3-orig/doc/Makefile.in morituri-0.2.3/doc/Makefile.in
+--- morituri-0.2.3-orig/doc/Makefile.in	2014-11-01 00:13:01.231364181 +0100
++++ morituri-0.2.3/doc/Makefile.in	2014-11-01 00:13:56.691812229 +0100
+@@ -486,7 +486,7 @@ morituri.ics: $(top_srcdir)/morituri.doa
+ 	-moap doap -f $(top_srcdir)/morituri.doap ical > morituri.ics
+ 
+ rip.1: $(top_srcdir)/morituri/extern/python-command/scripts/help2man $(top_srcdir)/morituri
+-	PYTHONPATH=$(top_srcdir) $(PYTHON) $(top_srcdir)/morituri/extern/python-command/scripts/help2man morituri.rip.main.Rip rip > rip.1
++	PYTHONPATH=$(top_srcdir):$(PYTHONPATH) $(PYTHON) $(top_srcdir)/morituri/extern/python-command/scripts/help2man morituri.rip.main.Rip rip > rip.1
+ 
+ clean-local:
+ 	@rm -rf reference