mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, fetchpatch, unzip, mpg123 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mp3gain";
|
|
version = "1.6.2";
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/${pname}/${pname}-${lib.replaceStrings ["."] ["_"] version}-src.zip";
|
|
sha256 = "0varr6y7k8zarr56b42r0ad9g3brhn5vv3xjg1c0v19jxwr4gh2w";
|
|
};
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
buildInputs = [ 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 = "https://mp3gain.sourceforge.net/";
|
|
license = licenses.lgpl21;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ devhell ];
|
|
mainProgram = "mp3gain";
|
|
};
|
|
}
|