diff --git a/pkgs/by-name/vo/vorbisgain/fprintf.patch b/pkgs/by-name/vo/vorbisgain/fprintf.patch new file mode 100644 index 0000000000000..45a6833a446c0 --- /dev/null +++ b/pkgs/by-name/vo/vorbisgain/fprintf.patch @@ -0,0 +1,12 @@ +--- vorbisgain-0.37/misc.c 2004-01-03 16:17:28.000000000 -0500 ++++ vorbisgain-0.37-patched/misc.c 2025-01-07 20:51:12.989521816 -0500 +@@ -56,8 +56,7 @@ + vfprintf(stderr, message, args); + va_end(args); + +- fprintf(stderr, strerror(err_num)); +- fprintf(stderr, "\n"); ++ fprintf(stderr, "%s\n", strerror(err_num)); + } + + diff --git a/pkgs/by-name/vo/vorbisgain/isatty.patch b/pkgs/by-name/vo/vorbisgain/isatty.patch new file mode 100644 index 0000000000000..cb09845f980f1 --- /dev/null +++ b/pkgs/by-name/vo/vorbisgain/isatty.patch @@ -0,0 +1,10 @@ +--- vorbisgain-0.37/misc.c 2004-01-03 16:17:28.000000000 -0500 ++++ vorbisgain-0.37-patched/misc.c 2025-01-07 20:35:13.056221211 -0500 +@@ -23,6 +23,7 @@ + #else /* WIN32 */ + #include + #include ++#include + + #ifndef DISABLE_WINSIZE + diff --git a/pkgs/by-name/vo/vorbisgain/package.nix b/pkgs/by-name/vo/vorbisgain/package.nix index ca7b62c7715b3..6775b8d500fd3 100644 --- a/pkgs/by-name/vo/vorbisgain/package.nix +++ b/pkgs/by-name/vo/vorbisgain/package.nix @@ -15,18 +15,16 @@ stdenv.mkDerivation rec { sha256 = "1v1h6mhnckmvvn7345hzi9abn5z282g4lyyl4nnbqwnrr98v0vfx"; }; - hardeningDisable = [ "format" ]; + patches = [ + ./isatty.patch + ./fprintf.patch + ]; buildInputs = [ libogg libvorbis ]; - patchPhase = '' - chmod -v +x configure - configureFlags="--mandir=$out/share/man" - ''; - meta = with lib; { homepage = "https://sjeng.org/vorbisgain.html"; description = "Utility that corrects the volume of an Ogg Vorbis file to a predefined standardized loudness";