normalize: fix build on gcc15

This commit is contained in:
wxt
2026-01-01 21:39:16 +08:00
parent 38e6517ea3
commit 487f74ad57
+13 -4
View File
@@ -5,15 +5,24 @@
libmad,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "normalize";
version = "0.7.7";
src = fetchurl {
url = "mirror://savannah/normalize/${pname}-${version}.tar.gz";
sha256 = "1n5khss10vjjp6w69q9qcl4kqfkd0pr555lgqghrchn6rjms4mb0";
url = "mirror://savannah/normalize/normalize-${finalAttrs.version}.tar.gz";
hash = "sha256-YFWiq8zGQpbhw4+WUvIFbTo8CWU44WS4uVJuELSGs9g=";
};
postPatch = ''
sed -e '1i #include <string.h>' -i nid3lib/frame_desc.c
substituteInPlace nid3lib/frame_desc.c \
--replace-fail "int strcmp();" ""
sed -e '1i #include <unistd.h>' -i nid3lib/write.c
substituteInPlace nid3lib/write.c \
--replace-fail "int ftruncate();" ""
'';
buildInputs = [ libmad ];
meta = {
@@ -22,4 +31,4 @@ stdenv.mkDerivation rec {
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
};
}
})