nixos-config/packages/tools/audio/ebu-norm/default.nix

42 lines
1.0 KiB
Nix
Raw Normal View History

2021-12-18 17:58:57 +00:00
{ stdenv, ffmpeg, sound-gambit, gawk, bc, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "ebu-norm";
version = "2.2";
src = fetchFromGitHub {
owner = "chrismhampson";
repo = "ebu-norm";
rev = "v${version}";
sha256 = "120rpi0k3rq0v50ia9cyailgnx5wvpgkzbp8vi74xmr3c0lf26r4";
};
patches = [ ./0000-remove-dep-check.patch ];
buildInputs = [
ffmpeg sound-gambit gawk bc
];
postPatch = ''
for file in ebu-scan ebu-plot ebu-norm tp-norm; do
sed --in-place \
-e "s|ffmpeg|${ffmpeg}/bin/ffmpeg|g" \
-e "s|bc|${bc}/bin/bc|g" \
-e "s|sound-gambit|${sound-gambit}/bin/sound-gambit|g" \
$file
done
'';
installPhase = ''
mkdir -p $out/bin
cp {ebu-scan,ebu-plot,ebu-norm,tp-norm} $out/bin/
'';
meta = with lib; {
description = "An advanced, professional batch normalizer and scanner for EBU R 128 and other target levels.";
homepage = "https://github.com/chrismhampson/ebu-norm";
license = licenses.gpl3;
maintainers = [ ];
};
}