···1-Two changes:
2-3-* Add an alias for `which', so abcde can find things in store
4-* Choose the right CDROM reader syntax for `cd-paranoia'
5-6---- abcde-2.5.4/abcde~ 2012-09-18 06:09:31.000000000 -0700
7-+++ abcde-2.5.4/abcde 2012-10-27 00:08:48.000862364 -0700
8-@@ -17,6 +17,11 @@
9-10- VERSION='2.5.4'
11-12-+which ()
13-+{
14-+ type -P $1
15-+}
16-+
17- usage ()
18- {
19- echo "This is abcde v$VERSION."
20-@@ -3497,6 +3502,10 @@
21- for DEFAULT_CDROMREADER in $DEFAULT_CDROMREADERS; do
22- if new_checkexec $DEFAULT_CDROMREADER; then
23- CDROMREADERSYNTAX=$DEFAULT_CDROMREADER
24-+ case "$DEFAULT_CDROMREADER" in
25-+ cd-paranoia) CDROMREADERSYNTAX=cdparanoia;;
26-+ *) CDROMREADERSYNTAX=$DEFAULT_CDROMREADER;;
27-+ esac
28- break
29- fi
30- done
···000000000000000000000000000000
+16-18
pkgs/applications/audio/abcde/default.nix
···3, perl, MusicBrainz, MusicBrainzDiscID
4, makeWrapper }:
56-let version = "2.8.1";
7in
8 stdenv.mkDerivation {
9 name = "abcde-${version}";
10 src = fetchurl {
11 url = "https://abcde.einval.com/download/abcde-${version}.tar.gz";
12- sha256 = "0f9bjs0phk23vry7gvh0cll9vl6kmc1y4fwwh762scfdvpbp3774";
13 };
1415 # FIXME: This package does not support `distmp3', `eject', etc.
1617- patches = [ ./abcde.patch ];
18-19 configurePhase = ''
20 sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
21 s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
22 s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
23 "Makefile";
2425- # We use `cd-paranoia' from GNU libcdio, which contains a hyphen
26- # in its name, unlike Xiph's cdparanoia.
27- sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ;
28- s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \
29- "abcde"
3031 substituteInPlace "abcde" \
32 --replace "/etc/abcde.conf" "$out/etc/abcde.conf"
33-34 '';
3536- buildInputs = [ makeWrapper ];
3738- propagatedBuildInputs = [ perl MusicBrainz MusicBrainzDiscID ];
3940 installFlags = [ "sysconfdir=$(out)/etc" ];
4142 postFixup = ''
43 for cmd in abcde cddb-tool abcde-musicbrainz-tool; do
44- wrapProgram "$out/bin/$cmd" --prefix PATH ":" \
45- ${stdenv.lib.makeBinPath [ "$out" which libcdio-paranoia cddiscid wget vorbis-tools id3v2 eyeD3 lame flac glyr ]}
000046 done
47 '';
4849- meta = {
50 homepage = http://abcde.einval.com/wiki/;
51- license = stdenv.lib.licenses.gpl2Plus;
052 description = "Command-line audio CD ripper";
53-54 longDescription = ''
55 abcde is a front-end command-line utility (actually, a shell
56 script) that grabs tracks off a CD, encodes them to
57 Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack)
58 format, and tags them, all in one go.
59 '';
60- platforms = stdenv.lib.platforms.linux;
61 };
62 }
···3, perl, MusicBrainz, MusicBrainzDiscID
4, makeWrapper }:
56+let version = "2.9.2";
7in
8 stdenv.mkDerivation {
9 name = "abcde-${version}";
10 src = fetchurl {
11 url = "https://abcde.einval.com/download/abcde-${version}.tar.gz";
12+ sha256 = "13c5yvp87ckqgha160ym5rdr1a4divgvyqbjh0yb6ffclip6qd9l";
13 };
1415 # FIXME: This package does not support `distmp3', `eject', etc.
160017 configurePhase = ''
18 sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
19 s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
20 s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
21 "Makefile";
2223+ echo 'CDPARANOIA=${libcdio-paranoia}/bin/cd-paranoia' >>abcde.conf
24+ echo CDROMREADERSYNTAX=cdparanoia >>abcde.conf
0002526 substituteInPlace "abcde" \
27 --replace "/etc/abcde.conf" "$out/etc/abcde.conf"
028 '';
2930+ nativeBuildInputs = [ makeWrapper ];
3132+ buildInputs = [ perl MusicBrainz MusicBrainzDiscID ];
3334 installFlags = [ "sysconfdir=$(out)/etc" ];
3536 postFixup = ''
37 for cmd in abcde cddb-tool abcde-musicbrainz-tool; do
38+ wrapProgram "$out/bin/$cmd" \
39+ --prefix PERL5LIB : "$PERL5LIB" \
40+ --prefix PATH ":" ${stdenv.lib.makeBinPath [
41+ "$out" which libcdio-paranoia cddiscid wget
42+ vorbis-tools id3v2 eyeD3 lame flac glyr
43+ ]}
44 done
45 '';
4647+ meta = with stdenv.lib; {
48 homepage = http://abcde.einval.com/wiki/;
49+ license = licenses.gpl2Plus;
50+ maintainers = with maintainers; [ gebner ];
51 description = "Command-line audio CD ripper";
052 longDescription = ''
53 abcde is a front-end command-line utility (actually, a shell
54 script) that grabs tracks off a CD, encodes them to
55 Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack)
56 format, and tags them, all in one go.
57 '';
58+ platforms = platforms.linux;
59 };
60 }