about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/r128gain/default.nix
blob: 17f6840d4e22b094b4a31fbddd689cc931bbf5f1 (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
{ lib
, fetchFromGitHub
, substituteAll
, ffmpeg_3
, python3Packages
, sox
}:

python3Packages.buildPythonApplication rec {
  pname = "r128gain";
  version = "1.0.1";

  src = fetchFromGitHub {
    owner = "desbma";
    repo = "r128gain";
    rev = version;
    sha256 = "0fnxis2g7mw8mb0cz9bws909lrndli7ml54nnzda49vc2fhbjwxr";
  };

  patches = [
    (
      substituteAll {
        src = ./ffmpeg-location.patch;
        ffmpeg = ffmpeg_3;
      }
    )
  ];

  propagatedBuildInputs = with python3Packages; [ crcmod ffmpeg-python mutagen tqdm ];
  checkInputs = with python3Packages; [ requests sox ];

  # Testing downloads media files for testing, which requires the
  # sandbox to be disabled.
  doCheck = false;

  meta = with lib; {
    description = "Fast audio loudness scanner & tagger (ReplayGain v2 / R128)";
    homepage = "https://github.com/desbma/r128gain";
    license = licenses.lgpl2Plus;
    maintainers = [ maintainers.AluisioASG ];
    platforms = platforms.all;
  };
}