diff options
author | Pierre Bourdon <delroth@gmail.com> | 2020-06-28 11:12:52 +0200 |
---|---|---|
committer | Pierre Bourdon <delroth@gmail.com> | 2020-06-28 11:18:38 +0200 |
commit | cbb288204d1adfd5269cb1e5ee69013546e268a7 (patch) | |
tree | d8e1193d4d50ecd637ed44d7a8724a2f0e0b4310 | |
parent | 87dbe6d797f98a3e5bf1ac5b868f864acdfbf939 (diff) | |
download | nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.tar nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.tar.gz nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.tar.bz2 nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.tar.lz nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.tar.xz nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.tar.zst nixpkgs-cbb288204d1adfd5269cb1e5ee69013546e268a7.zip |
file: backport patch to fix a 5.39 regression
This bug is causing diffoscope to fail to build with file 5.39.
-rw-r--r-- | pkgs/tools/misc/file/default.nix | 6 | ||||
-rw-r--r-- | pkgs/tools/misc/file/webassembly-format-fix.patch | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index 730234998ed..8e284b25c08 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -12,6 +12,12 @@ stdenv.mkDerivation rec { sha256 = "1lgs2w2sgamzf27kz5h7pajz7v62554q21fbs11n4mfrfrm2hpgh"; }; + 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 = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file; buildInputs = [ zlib ] ++ stdenv.lib.optional stdenv.hostPlatform.isWindows libgnurx; diff --git a/pkgs/tools/misc/file/webassembly-format-fix.patch b/pkgs/tools/misc/file/webassembly-format-fix.patch new file mode 100644 index 00000000000..5eca833e4d7 --- /dev/null +++ b/pkgs/tools/misc/file/webassembly-format-fix.patch @@ -0,0 +1,13 @@ +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) |