file: 5.39 -> 5.40

This commit is contained in:
Kid 2021-06-18 01:29:06 +08:00 committed by Frederik Rietdijk
parent d073245f24
commit 5a4a561f8b
2 changed files with 2 additions and 21 deletions

View file

@ -2,22 +2,16 @@
stdenv.mkDerivation rec {
pname = "file";
version = "5.39";
version = "5.40";
src = fetchurl {
urls = [
"ftp://ftp.astron.com/pub/file/${pname}-${version}.tar.gz"
"https://distfiles.macports.org/file/${pname}-${version}.tar.gz"
];
sha256 = "1lgs2w2sgamzf27kz5h7pajz7v62554q21fbs11n4mfrfrm2hpgh";
sha256 = "0myxlpj9gy2diqavx33vq88kpvr1k1bpzsm0d0zmb2hl7ks22wqn";
};
patches = [
# https://github.com/file/file/commit/85b7ab83257b3191a1a7ca044589a092bcef2bb3
# Without the RCS id change to avoid conflicts. Remove on next bump.
./webassembly-format-fix.patch
];
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file;
buildInputs = [ zlib ]
++ lib.optional stdenv.hostPlatform.isWindows libgnurx;

View file

@ -1,13 +0,0 @@
diff --git a/src/funcs.c b/src/funcs.c
index 299b8f022..ecbfa28c5 100644
--- a/src/funcs.c
+++ b/src/funcs.c
@@ -93,7 +93,7 @@ file_checkfmt(char *msg, size_t mlen, const char *fmt)
if (*++p == '%')
continue;
// Skip uninteresting.
- while (strchr("0.'+- ", *p) != NULL)
+ while (strchr("#0.'+- ", *p) != NULL)
p++;
if (*p == '*') {
if (msg)