Merge pull request #25362 from laMudri/abcde-musicbrainz

abcde: specify perl runtime dependencies for abcde-musicbrainz-tool
This commit is contained in:
Jörg Thalheim 2017-05-01 18:27:04 +02:00 committed by GitHub
commit 0c0519bd3b

View file

@ -19,46 +19,31 @@ in
configurePhase = '' configurePhase = ''
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ; sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ; s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \ s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
"Makefile"; "Makefile";
# We use `cd-paranoia' from GNU libcdio, which contains a hyphen # We use `cd-paranoia' from GNU libcdio, which contains a hyphen
# in its name, unlike Xiph's cdparanoia. # in its name, unlike Xiph's cdparanoia.
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ; sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ;
s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \ s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \
"abcde" "abcde"
substituteInPlace "abcde" \ substituteInPlace "abcde" \
--replace "/etc/abcde.conf" "$out/etc/abcde.conf" --replace "/etc/abcde.conf" "$out/etc/abcde.conf"
''; '';
# no ELFs in this package, only scripts
dontStrip = true;
dontPatchELF = true;
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];
propagatedBuildInputs = [ perl DigestSHA MusicBrainz MusicBrainzDiscID ];
installFlags = [ "sysconfdir=$(out)/etc" ]; installFlags = [ "sysconfdir=$(out)/etc" ];
postInstall = '' postFixup = ''
# substituteInPlace "$out/bin/cddb-tool" \ for cmd in abcde cddb-tool abcde-musicbrainz-tool; do
# --replace '#!/bin/sh' '#!${bash}/bin/sh' wrapProgram "$out/bin/$cmd" --prefix PATH ":" \
# substituteInPlace "$out/bin/abcde" \ ${stdenv.lib.makeBinPath [ "$out" which libcdio cddiscid wget vorbis-tools id3v2 eyeD3 lame flac glyr ]}
# --replace '#!/bin/bash' '#!${bash}/bin/bash' done
# 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'
wrapProgram "$out/bin/abcde" --prefix PATH ":" \
${stdenv.lib.makeBinPath [ "$out" which libcdio cddiscid wget vorbis-tools id3v2 eyeD3 lame flac glyr ]}
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
"${wget}/bin"
wrapProgram "$out/bin/abcde-musicbrainz-tool" --prefix PATH ":" \
"${wget}/bin"
''; '';
meta = { meta = {