2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, unzip, mpg123 }:
|
2014-12-20 15:21:42 +00:00
|
|
|
|
2021-06-20 11:34:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mp3gain";
|
|
|
|
version = "1.6.2";
|
2014-12-20 15:21:42 +00:00
|
|
|
src = fetchurl {
|
2021-06-20 11:34:30 +01:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${lib.replaceStrings ["."] ["_"] version}-src.zip";
|
2019-10-03 17:41:06 +01:00
|
|
|
sha256 = "0varr6y7k8zarr56b42r0ad9g3brhn5vv3xjg1c0v19jxwr4gh2w";
|
2014-12-20 15:21:42 +00:00
|
|
|
};
|
|
|
|
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
buildInputs = [ mpg123 ];
|
2014-12-20 15:21:42 +00:00
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2020-10-18 15:19:10 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "0001-fix-security-bugs.patch";
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/mp3gain/files/mp3gain-1.6.2-CVE-2019-18359-plus.patch?id=36f8689f7903548f5d89827a6e7bdf70a9882cee";
|
|
|
|
sha256 = "10n53wm0xynlcxqlnaqfgamjzcpfz41q1jlg0bhw4kq1kzhs4yyw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2014-12-20 15:21:42 +00:00
|
|
|
buildFlags = [ "OSTYPE=linux" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-12-30 21:30:05 +00:00
|
|
|
install -vD mp3gain "$out/bin/mp3gain"
|
2014-12-20 15:21:42 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-12-20 15:21:42 +00:00
|
|
|
description = "Lossless mp3 normalizer with statistical analysis";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://mp3gain.sourceforge.net/";
|
2020-10-18 15:19:10 +01:00
|
|
|
license = licenses.lgpl21;
|
2021-01-06 04:20:00 +00:00
|
|
|
platforms = platforms.unix;
|
2020-10-18 15:19:10 +01:00
|
|
|
maintainers = with maintainers; [ devhell ];
|
2014-12-20 15:21:42 +00:00
|
|
|
};
|
|
|
|
}
|