From de7f76603dd37b40957b122c196ace63b921a797 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Tue, 27 Feb 2018 17:36:18 +0000 Subject: aacgain: fix compilation error --- pkgs/applications/audio/aacgain/default.nix | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'pkgs/applications/audio/aacgain') 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 ]; }; } -- cgit 1.4.1