diff options
author | Robbin C <robbinch33@gmail.com> | 2015-06-09 17:07:11 +0800 |
---|---|---|
committer | Rok Garbas <rok@garbas.si> | 2015-06-12 12:54:07 +0200 |
commit | dbac15d66c887689e7701837ffb462fa5820025d (patch) | |
tree | 661d3e22fd32d596c2186386293432c722d31c0b /pkgs/applications/audio/aacgain | |
parent | 399b5496119d1f81fb64dc1a86143adade698129 (diff) | |
download | nixlib-dbac15d66c887689e7701837ffb462fa5820025d.tar nixlib-dbac15d66c887689e7701837ffb462fa5820025d.tar.gz nixlib-dbac15d66c887689e7701837ffb462fa5820025d.tar.bz2 nixlib-dbac15d66c887689e7701837ffb462fa5820025d.tar.lz nixlib-dbac15d66c887689e7701837ffb462fa5820025d.tar.xz nixlib-dbac15d66c887689e7701837ffb462fa5820025d.tar.zst nixlib-dbac15d66c887689e7701837ffb462fa5820025d.zip |
aacgain: Add package.
This adds aacgain which is a normalizer for AAC (.m4a) audio files.
Diffstat (limited to 'pkgs/applications/audio/aacgain')
-rw-r--r-- | pkgs/applications/audio/aacgain/default.nix | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/pkgs/applications/audio/aacgain/default.nix b/pkgs/applications/audio/aacgain/default.nix new file mode 100644 index 000000000000..4cfc51970aad --- /dev/null +++ b/pkgs/applications/audio/aacgain/default.nix @@ -0,0 +1,72 @@ +{ stdenv, fetchgit, unzip, m4, libtool, automake, autoconf, mp3gain, mp4v2, faad2 }: + +stdenv.mkDerivation { + name = "aacgain-1.9"; + srcs = [ + (fetchgit { + url = "https://github.com/mecke/aacgain.git"; + rev = "4a7d59d78eadbbd5413e905af8f91fe9184ce7a8"; + sha256 = "0y25avgmm1xpbggvkhby1a7v9wmhsp3wmp74q06sf8ph8xsfajw4"; + }) + mp3gain.src + mp4v2.src + faad2.src + ]; + + buildInputs = [ unzip m4 libtool automake autoconf ]; + + setSourceRoot = "sourceRoot=`pwd`"; + + postUnpack = '' + cd $sourceRoot + # mp3gain does not unzip to its own directory, so move files accordingly. + mkdir mp3gain + find . -type f -maxdepth 1 -exec mv {} mp3gain/ \; + mv mpglibDBL mp3gain/ + + mv aacgain-* aacgain + mv faad2-* faad2 + mv mp4v2-* mp4v2 + ''; + + patchPhase = '' + cd $sourceRoot + patch -p2 -N < aacgain/linux/mp3gain.patch + ''; + + configurePhase = '' + cd $sourceRoot/mp4v2 + ./configure + + cd $sourceRoot/faad2 + ./configure + ''; + + buildPhase = '' + cd $sourceRoot/mp4v2 + make libmp4v2.la + + cd $sourceRoot/faad2/libfaad + make + + cd $sourceRoot/aacgain/linux + sh prepare.sh + mkdir build + cd build + ../../../configure + make + ''; + + installPhase = '' + strip -s aacgain/aacgain + install -vD aacgain/aacgain "$out/bin/aacgain" + ''; + + meta = { + description = "ReplayGain for AAC files"; + homepage = https://github.com/mecke/aacgain.git; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.robbinch ]; + }; +} |