about summary refs log tree commit diff
path: root/pkgs/applications/audio/aacgain
diff options
context:
space:
mode:
authorRobbin C <robbinch33@gmail.com>2015-06-11 00:12:46 +0800
committerRok Garbas <rok@garbas.si>2015-06-12 12:54:08 +0200
commitc07fb11cd2c7495780200f26ac798574ea0dd111 (patch)
treed203abd5bbf83c3203d3d3a55e0a325a17a7c209 /pkgs/applications/audio/aacgain
parent681cbedd4a522b0ef99f49cba4c5e53b3920d718 (diff)
downloadnixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.tar
nixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.tar.gz
nixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.tar.bz2
nixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.tar.lz
nixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.tar.xz
nixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.tar.zst
nixlib-c07fb11cd2c7495780200f26ac798574ea0dd111.zip
aacgain: Use more up-to-date upstream repository.
Use more up-to-date upstream repostiory, which allows for a cleaner
build. It includes mp4v2 and faad, which will be built statically and
linked to the resulting binary.
Diffstat (limited to 'pkgs/applications/audio/aacgain')
-rw-r--r--pkgs/applications/audio/aacgain/default.nix65
1 files changed, 19 insertions, 46 deletions
diff --git a/pkgs/applications/audio/aacgain/default.nix b/pkgs/applications/audio/aacgain/default.nix
index 3f1c67a2a618..69cc798ec0f9 100644
--- a/pkgs/applications/audio/aacgain/default.nix
+++ b/pkgs/applications/audio/aacgain/default.nix
@@ -1,61 +1,34 @@
-{ stdenv, fetchFromGitHub, unzip, m4, libtool, automake, autoconf, mp3gain, mp4v2, faad2 }:
+{ stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation {
-  name = "aacgain-1.9";
-  srcs = [
-    (fetchFromGitHub {
-      owner = "mecke";
-      repo = "aacgain";
-      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
-  '';
+  name = "aacgain-1.9.0";
+  src = fetchFromGitHub {
+    owner = "mulx";
+    repo = "aacgain";
+    rev = "7c29dccd878ade1301710959aeebe87a8f0828f5";
+    sha256 = "07hl432vsscqg01b6wr99qmsj4gbx0i02x4k565432y6zpfmaxm0";
+  };
 
   configurePhase = ''
-    cd $sourceRoot/mp4v2
+    cd mp4v2
+    ./configure
+
+    cd ../faad2
     ./configure
 
-    cd $sourceRoot/faad2
+    cd ..
     ./configure
   '';
 
   buildPhase = ''
-    cd $sourceRoot/mp4v2
+    cd mp4v2
     make libmp4v2.la
 
-    cd $sourceRoot/faad2/libfaad
-    make
+    cd ../faad2
+    make LDFLAGS=-static
 
-    cd $sourceRoot/aacgain/linux
-    sh prepare.sh
-    mkdir build
-    cd build
-    ../../../configure
-    make
+    cd ..
+    make   
   '';
 
   installPhase = ''
@@ -65,7 +38,7 @@ stdenv.mkDerivation {
 
   meta = {
     description = "ReplayGain for AAC files";
-    homepage = https://github.com/mecke/aacgain.git;
+    homepage = https://github.com/mulx/aacgain;
     license = stdenv.lib.licenses.gpl2;
     platforms = stdenv.lib.platforms.linux;
     maintainers = [ stdenv.lib.maintainers.robbinch ];