2012-10-27 22:13:56 +00:00
|
|
|
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, lame, flac, eject, mkcue
|
|
|
|
, perl, DigestSHA, MusicBrainz, MusicBrainzDiscID
|
2008-05-26 20:54:34 +00:00
|
|
|
, makeWrapper }:
|
|
|
|
|
2012-10-27 22:13:56 +00:00
|
|
|
let version = "2.5.4";
|
2008-05-26 20:54:34 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "abcde-${version}";
|
|
|
|
src = fetchurl {
|
2008-10-08 18:52:20 +00:00
|
|
|
url = "mirror://debian/pool/main/a/abcde/abcde_${version}.orig.tar.gz";
|
2012-10-27 22:13:56 +00:00
|
|
|
sha256 = "14g5lsgh53hza9848351kwpygc0yqpvvzp3s923aja77f2wpkdl5";
|
2008-05-26 20:54:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# FIXME: This package does not support MP3 encoding (only Ogg),
|
|
|
|
# nor `distmp3', `eject', etc.
|
|
|
|
|
2012-10-27 22:13:56 +00:00
|
|
|
patches = [ ./abcde.patch ];
|
2008-05-26 20:54:34 +00:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
|
|
|
|
s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
|
|
|
|
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
|
|
|
|
"Makefile";
|
|
|
|
|
|
|
|
# We use `cd-paranoia' from GNU libcdio, which contains a hyphen
|
|
|
|
# in its name, unlike Xiph's cdparanoia.
|
2008-10-29 21:59:44 +00:00
|
|
|
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ;
|
|
|
|
s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \
|
2008-05-26 20:54:34 +00:00
|
|
|
"abcde"
|
|
|
|
|
|
|
|
substituteInPlace "abcde" \
|
|
|
|
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
|
2012-10-27 22:13:56 +00:00
|
|
|
|
2008-05-26 20:54:34 +00:00
|
|
|
'';
|
|
|
|
|
2012-10-27 22:13:56 +00:00
|
|
|
# no ELFs in this package, only scripts
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
2008-05-26 20:54:34 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2012-10-27 22:13:56 +00:00
|
|
|
# substituteInPlace "$out/bin/cddb-tool" \
|
|
|
|
# --replace '#!/bin/sh' '#!${bash}/bin/sh'
|
|
|
|
# substituteInPlace "$out/bin/abcde" \
|
|
|
|
# --replace '#!/bin/bash' '#!${bash}/bin/bash'
|
|
|
|
|
|
|
|
# generic fixup script should be doing this, but it ignores this file for some reason
|
|
|
|
substituteInPlace "$out/bin/abcde-musicbrainz-tool" \
|
|
|
|
--replace '#!/usr/bin/perl' '#!${perl}/bin/perl'
|
2008-05-26 20:54:34 +00:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/abcde" --prefix PATH ":" \
|
2010-08-29 15:53:42 +00:00
|
|
|
"$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin:${id3v2}/bin:${lame}/bin"
|
2008-05-26 20:54:34 +00:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
|
|
|
|
"${wget}/bin"
|
2012-10-27 22:13:56 +00:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/abcde-musicbrainz-tool" --prefix PATH ":" \
|
|
|
|
"${wget}/bin"
|
2008-05-26 20:54:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2012-10-27 22:13:56 +00:00
|
|
|
homepage = "http://lly.org/~rcw/abcde/page/";
|
2013-07-04 16:13:20 +00:00
|
|
|
license = "GPLv2+";
|
2008-05-26 20:54:34 +00:00
|
|
|
description = "A Better CD Encoder (ABCDE)";
|
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
};
|
2010-08-29 15:53:42 +00:00
|
|
|
}
|