diff --git a/pkgs/tools/misc/file/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch b/pkgs/tools/misc/file/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch new file mode 100644 index 000000000000..ff405c446597 --- /dev/null +++ b/pkgs/tools/misc/file/0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch @@ -0,0 +1,26 @@ +From c54605718190ad8fe9c25cb475f1f32ca7cd54f7 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 12 Apr 2026 22:15:14 +0000 +Subject: [PATCH] PR/725: inliniac: Revert previous and always set offset. + +--- + src/softmagic.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/softmagic.c b/src/softmagic.c +index 9aaf8b3e..7cf7c798 100644 +--- a/src/softmagic.c ++++ b/src/softmagic.c +@@ -1577,8 +1577,7 @@ normal: + ms->offset = offset; + ms->eoffset = 0; + } else { +- if (b->fd != -1) +- ms->offset = ms->eoffset + offset; ++ ms->offset = ms->eoffset + offset; + } + } + if ((ms->flags & MAGIC_DEBUG) != 0) { +-- +2.51.2 + diff --git a/pkgs/tools/misc/file/default.nix b/pkgs/tools/misc/file/default.nix index dd856e5aef20..ae27a481b38f 100644 --- a/pkgs/tools/misc/file/default.nix +++ b/pkgs/tools/misc/file/default.nix @@ -39,6 +39,8 @@ stdenv.mkDerivation (finalAttrs: { # Vendored patch because using fetchpatch is impossible for a package in # this part of the bootstrap chain. ./0001-PR-745-streamout-Don-t-flush-when-trying-to-set-nega.patch + # Fixes breakage of python3Packages.python-magic and xdg-utils + ./0002-PR-725-inliniac-Revert-previous-and-always-set-offse.patch ]; strictDeps = true;