2018-02-27 18:36:18 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch }:
|
2015-06-09 11:07:11 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2015-06-10 18:12:46 +02:00
|
|
|
name = "aacgain-1.9.0";
|
2016-02-08 16:43:12 +01:00
|
|
|
|
2015-06-10 18:12:46 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mulx";
|
|
|
|
repo = "aacgain";
|
|
|
|
rev = "7c29dccd878ade1301710959aeebe87a8f0828f5";
|
|
|
|
sha256 = "07hl432vsscqg01b6wr99qmsj4gbx0i02x4k565432y6zpfmaxm0";
|
|
|
|
};
|
2015-06-09 11:07:11 +02:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-08 16:43:12 +01:00
|
|
|
|
2018-02-27 18:36:18 +01:00
|
|
|
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";
|
|
|
|
}}
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2015-06-09 11:07:11 +02:00
|
|
|
configurePhase = ''
|
2018-02-27 18:36:18 +01:00
|
|
|
runHook preConfigure
|
2015-06-10 18:12:46 +02:00
|
|
|
cd mp4v2
|
|
|
|
./configure
|
|
|
|
|
|
|
|
cd ../faad2
|
2015-06-09 11:07:11 +02:00
|
|
|
./configure
|
|
|
|
|
2015-06-10 18:12:46 +02:00
|
|
|
cd ..
|
2015-06-09 11:07:11 +02:00
|
|
|
./configure
|
2018-02-27 18:36:18 +01:00
|
|
|
runHook postConfigure
|
2015-06-09 11:07:11 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2018-02-27 18:36:18 +01:00
|
|
|
runHook preBuild
|
2015-06-10 18:12:46 +02:00
|
|
|
cd mp4v2
|
2015-06-09 11:07:11 +02:00
|
|
|
make libmp4v2.la
|
|
|
|
|
2015-06-10 18:12:46 +02:00
|
|
|
cd ../faad2
|
|
|
|
make LDFLAGS=-static
|
2015-06-09 11:07:11 +02:00
|
|
|
|
2015-06-10 18:12:46 +02:00
|
|
|
cd ..
|
2016-02-08 16:43:12 +01:00
|
|
|
make
|
2018-02-27 18:36:18 +01:00
|
|
|
runHook postBuild
|
2015-06-09 11:07:11 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-02-27 18:36:18 +01:00
|
|
|
install -D aacgain/aacgain "$out/bin/aacgain"
|
2015-06-09 11:07:11 +02:00
|
|
|
'';
|
|
|
|
|
2018-02-27 18:36:18 +01:00
|
|
|
meta = with stdenv.lib; {
|
2015-06-09 11:07:11 +02:00
|
|
|
description = "ReplayGain for AAC files";
|
2019-04-22 10:14:28 +02:00
|
|
|
homepage = https://aacgain.altosdesign.com;
|
2018-02-27 18:36:18 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.robbinch ];
|
2015-06-09 11:07:11 +02:00
|
|
|
};
|
|
|
|
}
|