aacgain: fix compilation error

This commit is contained in:
Jörg Thalheim 2018-02-27 17:36:18 +00:00
parent e41641d1e0
commit de7f76603d

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }: { stdenv, fetchFromGitHub, fetchpatch }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "aacgain-1.9.0"; name = "aacgain-1.9.0";
@ -12,7 +12,19 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
postPatch = ''
(
cd mp4v2
patch -p0 < ${fetchpatch {
name = "fix_missing_ptr_deref.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/fix_missing_ptr_deref.patch?h=aacgain-cvs&id=e1a19c920f57063e64bab75cb0d8624731f6e3d7";
sha256 = "1cq7r005nvmwdjb25z80grcam7jv6k57jnl2bh349mg3ajmslbq9";
}}
)
'';
configurePhase = '' configurePhase = ''
runHook preConfigure
cd mp4v2 cd mp4v2
./configure ./configure
@ -21,9 +33,11 @@ stdenv.mkDerivation {
cd .. cd ..
./configure ./configure
runHook postConfigure
''; '';
buildPhase = '' buildPhase = ''
runHook preBuild
cd mp4v2 cd mp4v2
make libmp4v2.la make libmp4v2.la
@ -32,18 +46,18 @@ stdenv.mkDerivation {
cd .. cd ..
make make
runHook postBuild
''; '';
installPhase = '' installPhase = ''
strip -s aacgain/aacgain install -D aacgain/aacgain "$out/bin/aacgain"
install -vD aacgain/aacgain "$out/bin/aacgain"
''; '';
meta = { meta = with stdenv.lib; {
description = "ReplayGain for AAC files"; description = "ReplayGain for AAC files";
homepage = https://github.com/mulx/aacgain; homepage = https://github.com/mulx/aacgain;
license = stdenv.lib.licenses.gpl2; license = licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
maintainers = [ stdenv.lib.maintainers.robbinch ]; maintainers = [ maintainers.robbinch ];
}; };
} }