Merge pull request #4877 from rycee/morituri

New packages 'morituri' and 'pycdio'
This commit is contained in:
Arseniy Seroka 2014-11-07 23:33:24 +03:00
commit d3bcc4ac98
5 changed files with 156 additions and 0 deletions

View File

@ -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;
};
}

View File

@ -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

View File

@ -0,0 +1,52 @@
diff -Nurp pycdio-0.20-orig/test/cdtext.toc pycdio-0.20/test/cdtext.toc
--- pycdio-0.20-orig/test/cdtext.toc 1970-01-01 01:00:00.000000000 +0100
+++ pycdio-0.20/test/cdtext.toc 2014-11-06 23:36:12.520708320 +0100
@@ -0,0 +1,48 @@
+CD_DA
+
+// global CD-TEXT data
+
+CD_TEXT {
+
+ // Mapping from language number (0..7) used in 'LANGUAGE' statements
+ // to language code.
+/// LANGUAGE_MAP {
+/// 0 : EN // 9 is the code for ENGLISH,
+/// // I don't know any other language code, yet
+/// }
+
+ // Language number should always start with 0
+ LANGUAGE 0 {
+ // Required fields - at least all CD-TEXT CDs I've seen so far have them.
+ TITLE "CD Title"
+ PERFORMER "Performer"
+ DISC_ID "XY12345"
+ UPC_EAN "" // usually empty
+
+ // Further possible items, all of them are optional
+ ARRANGER ""
+ SONGWRITER ""
+ MESSAGE ""
+ GENRE "" // I'm not sure if this should be really ascii data
+ }
+}
+
+
+TRACK AUDIO
+// track specific CD-TEXT data
+CD_TEXT {
+ LANGUAGE 0 {
+ // if an item is defined for one track it should be defined for all tracks
+ TITLE "Track Title"
+
+ PERFORMER "Performer"
+ ISRC "US-XX1-98-01234"
+
+ ARRANGER ""
+ SONGWRITER ""
+ MESSAGE ""
+ }
+}
+
+SILENCE 1:0:0
+

View File

@ -1554,6 +1554,8 @@ let
mmv = callPackage ../tools/misc/mmv { }; mmv = callPackage ../tools/misc/mmv { };
morituri = callPackage ../applications/audio/morituri { };
most = callPackage ../tools/misc/most { }; most = callPackage ../tools/misc/most { };
multitail = callPackage ../tools/misc/multitail { }; multitail = callPackage ../tools/misc/multitail { };

View File

@ -6690,6 +6690,38 @@ let
}; };
pycdio = buildPythonPackage rec {
name = "pycdio-0.20";
disabled = !isPy27;
src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/source/p/pycdio/${name}.tar.gz";
sha256 = "1mrh233pj584gf7la64d4xlmvdnfl4jwpxs95lnd3i4zd5drid14";
};
buildInputs = [
self.setuptools self.nose pkgs.pkgconfig pkgs.swig pkgs.libcdio
];
patches = [ ../development/python-modules/pycdio/add-cdtext-toc.patch ];
# Run tests using nosetests but first need to install the binaries
# to the root source directory where they can be found.
checkPhase = ''
./setup.py install_lib -d .
nosetests
'';
meta = with stdenv.lib; {
homepage = http://www.gnu.org/software/libcdio/;
description = "Wrapper around libcdio (CD Input and Control library)";
maintainers = with maintainers; [ rycee ];
license = licenses.gpl3Plus;
};
};
pycryptopp = buildPythonPackage (rec { pycryptopp = buildPythonPackage (rec {
name = "pycryptopp-0.6.0.1206569328141510525648634803928199668821045408958"; name = "pycryptopp-0.6.0.1206569328141510525648634803928199668821045408958";
disabled = isPy3k || isPyPy; # see https://bitbucket.org/pypy/pypy/issue/1190/ disabled = isPy3k || isPyPy; # see https://bitbucket.org/pypy/pypy/issue/1190/