summary refs log tree commit diff
path: root/pkgs/applications/audio/aacgain
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-02-27 17:36:18 +0000
committerJörg Thalheim <joerg@thalheim.io>2018-02-27 17:38:23 +0000
commitde7f76603dd37b40957b122c196ace63b921a797 (patch)
tree6b64a43a95d736decd747cfa2536ea92e941949e /pkgs/applications/audio/aacgain
parente41641d1e094c6a619a5cea1944d58ef8b28ebca (diff)
downloadnixpkgs-de7f76603dd37b40957b122c196ace63b921a797.tar
nixpkgs-de7f76603dd37b40957b122c196ace63b921a797.tar.gz
nixpkgs-de7f76603dd37b40957b122c196ace63b921a797.tar.bz2
nixpkgs-de7f76603dd37b40957b122c196ace63b921a797.tar.lz
nixpkgs-de7f76603dd37b40957b122c196ace63b921a797.tar.xz
nixpkgs-de7f76603dd37b40957b122c196ace63b921a797.tar.zst
nixpkgs-de7f76603dd37b40957b122c196ace63b921a797.zip
aacgain: fix compilation error
Diffstat (limited to 'pkgs/applications/audio/aacgain')
-rw-r--r--pkgs/applications/audio/aacgain/default.nix28
1 files changed, 21 insertions, 7 deletions
diff --git a/pkgs/applications/audio/aacgain/default.nix b/pkgs/applications/audio/aacgain/default.nix
index a22866dc031..32ae107ed9c 100644
--- a/pkgs/applications/audio/aacgain/default.nix
+++ b/pkgs/applications/audio/aacgain/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub }:
+{ stdenv, fetchFromGitHub, fetchpatch }:
 
 stdenv.mkDerivation {
   name = "aacgain-1.9.0";
@@ -12,7 +12,19 @@ stdenv.mkDerivation {
 
   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 = ''
+    runHook preConfigure
     cd mp4v2
     ./configure
 
@@ -21,9 +33,11 @@ stdenv.mkDerivation {
 
     cd ..
     ./configure
+    runHook postConfigure
   '';
 
   buildPhase = ''
+    runHook preBuild
     cd mp4v2
     make libmp4v2.la
 
@@ -32,18 +46,18 @@ stdenv.mkDerivation {
 
     cd ..
     make
+    runHook postBuild
   '';
 
   installPhase = ''
-    strip -s aacgain/aacgain
-    install -vD aacgain/aacgain "$out/bin/aacgain"
+    install -D aacgain/aacgain "$out/bin/aacgain"
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "ReplayGain for AAC files";
     homepage = https://github.com/mulx/aacgain;
-    license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.robbinch ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.robbinch ];
   };
 }