summary refs log tree commit diff
path: root/pkgs/applications/audio/aacgain/default.nix
blob: 4d45de86f3a1faa926287c07ee086477ea2dbe7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, stdenv
, fetchFromGitHub
, cmake
, autoconf
, automake
, libtool
, faad2
, mp4v2
}:

stdenv.mkDerivation rec {
  pname = "aacgain";
  version = "2.0.0";

  src = fetchFromGitHub {
    owner = "dgilman";
    repo = pname;
    rev = version;
    sha256 = "sha256-9Y23Zh7q3oB4ha17Fpm1Hu2+wtQOA1llj6WDUAO2ARU=";
  };

  postPatch = ''
    cp -R ${faad2.src}/* 3rdparty/faad2
    cp -R ${mp4v2.src}/* 3rdparty/mp4v2
    chmod -R +w 3rdparty
  '';

  nativeBuildInputs = [
    cmake
    autoconf
    automake
    libtool
  ];

  env.NIX_CFLAGS_COMPILE = "-Wno-error=narrowing";

  meta = with lib; {
    description = "ReplayGain for AAC files";
    homepage = "https://github.com/dgilman/aacgain";
    license = licenses.gpl2Plus;
    platforms = platforms.unix;
    maintainers = [ maintainers.robbinch ];
  };
}