2020-02-11 18:02:24 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2020-09-30 20:30:08 +01:00
|
|
|
, genericUpdater
|
2020-02-11 18:02:24 +00:00
|
|
|
, substituteAll
|
2020-09-30 20:30:08 +01:00
|
|
|
, common-updater-scripts
|
2020-06-07 13:39:09 +01:00
|
|
|
, ffmpeg_3
|
2020-02-11 18:02:24 +00:00
|
|
|
, python3Packages
|
|
|
|
, sox
|
|
|
|
}:
|
2019-08-18 20:31:15 +01:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "r128gain";
|
2020-02-11 18:02:24 +00:00
|
|
|
version = "1.0.1";
|
2019-08-18 20:31:15 +01:00
|
|
|
|
2020-02-11 18:02:24 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "desbma";
|
|
|
|
repo = "r128gain";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0fnxis2g7mw8mb0cz9bws909lrndli7ml54nnzda49vc2fhbjwxr";
|
2019-08-18 20:31:15 +01:00
|
|
|
};
|
|
|
|
|
2020-02-11 18:02:24 +00:00
|
|
|
patches = [
|
|
|
|
(
|
|
|
|
substituteAll {
|
|
|
|
src = ./ffmpeg-location.patch;
|
2020-06-07 13:39:09 +01:00
|
|
|
ffmpeg = ffmpeg_3;
|
2020-02-11 18:02:24 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
];
|
2019-08-18 20:31:15 +01:00
|
|
|
|
2020-02-11 18:02:24 +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;
|
2019-08-18 20:31:15 +01:00
|
|
|
|
2020-09-30 20:30:08 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = genericUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
versionLister = "${common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-08-18 20:31:15 +01: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;
|
|
|
|
};
|
|
|
|
}
|