4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
36 lines
1018 B
Nix
36 lines
1018 B
Nix
{ lib, stdenv, fetchurl, fetchpatch, unzip, mpg123 }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "mp3gain-1.6.2";
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/mp3gain/mp3gain-1_6_2-src.zip";
|
|
sha256 = "0varr6y7k8zarr56b42r0ad9g3brhn5vv3xjg1c0v19jxwr4gh2w";
|
|
};
|
|
|
|
buildInputs = [ unzip mpg123 ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
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";
|
|
})
|
|
];
|
|
|
|
buildFlags = [ "OSTYPE=linux" ];
|
|
|
|
installPhase = ''
|
|
install -vD mp3gain "$out/bin/mp3gain"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Lossless mp3 normalizer with statistical analysis";
|
|
homepage = "http://mp3gain.sourceforge.net/";
|
|
license = licenses.lgpl21;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ devhell ];
|
|
};
|
|
}
|