2016-01-29 15:56:04 +00:00
|
|
|
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, which, vorbis-tools, id3v2, eyeD3
|
2015-06-27 13:19:22 +01:00
|
|
|
, lame, flac, eject, mkcue
|
2012-10-27 23:13:56 +01:00
|
|
|
, perl, DigestSHA, MusicBrainz, MusicBrainzDiscID
|
2008-05-26 21:54:34 +01:00
|
|
|
, makeWrapper }:
|
|
|
|
|
2016-04-30 11:47:17 +01:00
|
|
|
let version = "2.7.2";
|
2008-05-26 21:54:34 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "abcde-${version}";
|
|
|
|
src = fetchurl {
|
2015-06-27 13:19:22 +01:00
|
|
|
url = "http://abcde.einval.com/download/abcde-${version}.tar.gz";
|
2016-04-30 11:47:17 +01:00
|
|
|
sha256 = "1pakpi41k8yd780mfp0snhia6mmwjwxk9lcrq6gynimch8b8hfda";
|
2008-05-26 21:54:34 +01:00
|
|
|
};
|
|
|
|
|
2015-06-27 13:19:22 +01:00
|
|
|
# FIXME: This package does not support `distmp3', `eject', etc.
|
2008-05-26 21:54:34 +01:00
|
|
|
|
2012-10-27 23:13:56 +01:00
|
|
|
patches = [ ./abcde.patch ];
|
2008-05-26 21:54:34 +01: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 21:54:34 +01:00
|
|
|
"abcde"
|
|
|
|
|
|
|
|
substituteInPlace "abcde" \
|
|
|
|
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
|
2012-10-27 23:13:56 +01:00
|
|
|
|
2008-05-26 21:54:34 +01:00
|
|
|
'';
|
|
|
|
|
2012-10-27 23:13:56 +01:00
|
|
|
# no ELFs in this package, only scripts
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
2008-05-26 21:54:34 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2016-04-30 11:47:17 +01:00
|
|
|
installFlags = [ "sysconfdir=$(out)/etc" ];
|
|
|
|
|
2008-05-26 21:54:34 +01:00
|
|
|
postInstall = ''
|
2012-10-27 23:13:56 +01: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 21:54:34 +01:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/abcde" --prefix PATH ":" \
|
2016-06-06 12:42:07 +01:00
|
|
|
${stdenv.lib.makeBinPath [ "$out" which libcdio cddiscid wget vorbis-tools id3v2 eyeD3 lame flac ]}
|
2008-05-26 21:54:34 +01:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
|
|
|
|
"${wget}/bin"
|
2012-10-27 23:13:56 +01:00
|
|
|
|
|
|
|
wrapProgram "$out/bin/abcde-musicbrainz-tool" --prefix PATH ":" \
|
|
|
|
"${wget}/bin"
|
2008-05-26 21:54:34 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2015-06-27 13:19:22 +01:00
|
|
|
homepage = http://abcde.einval.com/wiki/;
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-10-05 15:22:46 +01:00
|
|
|
description = "Command-line audio CD ripper";
|
2008-05-26 21:54:34 +01: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 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2008-05-26 21:54:34 +01:00
|
|
|
};
|
2010-08-29 16:53:42 +01:00
|
|
|
}
|