2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, gitUpdater
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
2021-05-03 20:48:10 +00:00
|
|
|
, ffmpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3Packages
|
|
|
|
, sox
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "r128gain";
|
2020-10-07 09:15:18 +00:00
|
|
|
version = "1.0.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "desbma";
|
|
|
|
repo = "r128gain";
|
|
|
|
rev = version;
|
2020-10-07 09:15:18 +00:00
|
|
|
sha256 = "0w2i2szajv1vcmc96w0fczdr8xc28ijcf1gdg180f21gi6yh96sc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-05-03 20:48:10 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./ffmpeg-location.patch;
|
|
|
|
inherit ffmpeg;
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
passthru.updateScript = gitUpdater { inherit pname version; };
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|