2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, libcdio-paranoia, cddiscid, wget, which, vorbis-tools, id3v2, eyeD3
|
|
|
|
, lame, flac, glyr
|
2018-07-22 04:03:24 +02:00
|
|
|
, perl, MusicBrainz, MusicBrainzDiscID
|
2008-05-26 22:54:34 +02:00
|
|
|
, makeWrapper }:
|
|
|
|
|
2017-08-21 08:53:59 +02:00
|
|
|
let version = "2.8.1";
|
2008-05-26 22:54:34 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "abcde-${version}";
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://abcde.einval.com/download/abcde-${version}.tar.gz";
|
2017-08-21 08:53:59 +02:00
|
|
|
sha256 = "0f9bjs0phk23vry7gvh0cll9vl6kmc1y4fwwh762scfdvpbp3774";
|
2008-05-26 22:54:34 +02:00
|
|
|
};
|
|
|
|
|
2015-06-27 14:19:22 +02:00
|
|
|
# FIXME: This package does not support `distmp3', `eject', etc.
|
2008-05-26 22:54:34 +02:00
|
|
|
|
2012-10-28 00:13:56 +02:00
|
|
|
patches = [ ./abcde.patch ];
|
2008-05-26 22:54:34 +02:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
|
|
|
|
s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
|
2017-05-01 18:25:20 +02:00
|
|
|
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
|
|
|
|
"Makefile";
|
2008-05-26 22:54:34 +02:00
|
|
|
|
|
|
|
# We use `cd-paranoia' from GNU libcdio, which contains a hyphen
|
|
|
|
# in its name, unlike Xiph's cdparanoia.
|
2008-10-29 22:59:44 +01:00
|
|
|
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ;
|
|
|
|
s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \
|
2017-05-01 18:25:20 +02:00
|
|
|
"abcde"
|
2008-05-26 22:54:34 +02:00
|
|
|
|
2017-05-01 18:25:20 +02:00
|
|
|
substituteInPlace "abcde" \
|
|
|
|
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
|
2012-10-28 00:13:56 +02:00
|
|
|
|
2008-05-26 22:54:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2018-07-22 04:03:24 +02:00
|
|
|
propagatedBuildInputs = [ perl MusicBrainz MusicBrainzDiscID ];
|
2017-04-30 22:19:57 +02:00
|
|
|
|
2016-04-30 12:47:17 +02:00
|
|
|
installFlags = [ "sysconfdir=$(out)/etc" ];
|
|
|
|
|
2017-05-01 18:25:20 +02:00
|
|
|
postFixup = ''
|
|
|
|
for cmd in abcde cddb-tool abcde-musicbrainz-tool; do
|
|
|
|
wrapProgram "$out/bin/$cmd" --prefix PATH ":" \
|
2018-03-04 19:29:42 +01:00
|
|
|
${stdenv.lib.makeBinPath [ "$out" which libcdio-paranoia cddiscid wget vorbis-tools id3v2 eyeD3 lame flac glyr ]}
|
2017-05-01 18:25:20 +02:00
|
|
|
done
|
2008-05-26 22:54:34 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2015-06-27 14:19:22 +02:00
|
|
|
homepage = http://abcde.einval.com/wiki/;
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-10-05 16:22:46 +02:00
|
|
|
description = "Command-line audio CD ripper";
|
2008-05-26 22:54:34 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
abcde is a front-end command-line utility (actually, a shell
|
|
|
|
script) that grabs tracks off a CD, encodes them to
|
|
|
|
Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack)
|
|
|
|
format, and tags them, all in one go.
|
|
|
|
'';
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2008-05-26 22:54:34 +02:00
|
|
|
};
|
2010-08-29 17:53:42 +02:00
|
|
|
}
|