Skip to content

k2pdfopt: failed to run via flake "nix run nixpkgs#k2pdfopt" #376898

@wizzup

Description

@wizzup

Nixpkgs version

  • Unstable (25.05)

Describe the bug

$ nix run nixpkgs#k2pdfopt

failed with error said mupdf failed to build but running mupdf show no problem.

$ nix run nixpkgs#mupdf

Steps to reproduce

$ nix registry list | grep nixpkgs
global flake:nixpkgs github:NixOS/nixpkgs/nixpkgs-unstable

$ nix run nixpkgs#k2pdfopt
error: builder for '/nix/store/7khhnwai1rjam5wc9miqd80zrc710ziv-mupdf-1.25.2.drv' failed with exit code 1;
       last 20 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/k33sxdb0yiv14l7qs7y37dc8f64ayvql-mupdf-1.25.2-source.tar.gz
       > source root is mupdf-1.25.2-source
       > setting SOURCE_DATE_EPOCH to timestamp 1733836130 of file "mupdf-1.25.2-source/thirdparty/tesseract.txt"
       > Running phase: patchPhase
       > applying patch /nix/store/7d0w91cibppbgvdd4gspmcacv9d7jqaz-fix-darwin-system-deps.patch
       > patching file Makerules
       > applying patch /nix/store/r77yzwgb3n8af344ni5ib1f8775bhirx-fix-cpp-build.patch
       > patching file scripts/wrap/cpp.py
       > Hunk #1 succeeded at 5187 (offset 592 lines).
       > applying patch /nix/store/vgnjnf6plsrw4lnbbjc78rji0alqvmkk-mupdf-k2pdfopt.patch
       > patching file source/fitz/filter-basic.c
       > patching file source/fitz/stext-device.c
       > Hunk #1 FAILED at 971.
       > 1 out of 1 hunk FAILED -- saving rejects to file source/fitz/stext-device.c.rej
       > patching file source/fitz/string.c
       > Hunk #1 succeeded at 710 (offset 6 lines).
       > Hunk #2 succeeded at 726 (offset 6 lines).
       > patching file source/pdf/pdf-parse.c
       > Hunk #2 succeeded at 909 (offset 6 lines).
       For full logs, run 'nix log /nix/store/7khhnwai1rjam5wc9miqd80zrc710ziv-mupdf-1.25.2.drv'.
error: 1 dependencies of derivation '/nix/store/4mxwr79n7jx13qp3ga87mp1i4vj5hqya-k2pdfopt-2.55.drv' failed to build

$ nix log /nix/store/7khhnwai1rjam5wc9miqd80zrc710ziv-mupdf-1.25.2.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/k33sxdb0yiv14l7qs7y37dc8f64ayvql-mupdf-1.25.2-source.tar.gz
source root is mupdf-1.25.2-source
setting SOURCE_DATE_EPOCH to timestamp 1733836130 of file "mupdf-1.25.2-source/thirdparty/tesseract.txt"
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/7d0w91cibppbgvdd4gspmcacv9d7jqaz-fix-darwin-system-deps.patch
patching file Makerules
applying patch /nix/store/r77yzwgb3n8af344ni5ib1f8775bhirx-fix-cpp-build.patch
patching file scripts/wrap/cpp.py
Hunk #1 succeeded at 5187 (offset 592 lines).
applying patch /nix/store/vgnjnf6plsrw4lnbbjc78rji0alqvmkk-mupdf-k2pdfopt.patch
patching file source/fitz/filter-basic.c
patching file source/fitz/stext-device.c
Hunk #1 FAILED at 971.
1 out of 1 hunk FAILED -- saving rejects to file source/fitz/stext-device.c.rej
patching file source/fitz/string.c
Hunk #1 succeeded at 710 (offset 6 lines).
Hunk #2 succeeded at 726 (offset 6 lines).
patching file source/pdf/pdf-parse.c
Hunk #2 succeeded at 909 (offset 6 lines).

Expected behaviour

should not have any problem

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.11, NixOS, 25.05 (Warbler), 25.05beta743381.825479c345a7
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.11
  • channels(root): "nixos"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Notify maintainers

@bosu @danielfullmer


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions