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