Skip to content

nix build is broken #6664

@samestep

Description

@samestep

The README says that Typst can be built and run with Nix via this command:

nix run github:typst/typst -- --version

I tried running this on the current commit e9f1b58 with my x86 NixOS machine, and it failed with this error:

error: builder for '/nix/store/4cwnqxbdx4cvh0g9sqxxijabwa6r82pk-typst-deps-0.13.1.drv' failed with exit code 101;
       last 25 log lines:
       >     Checking icu_segmenter v1.5.0
       >     Checking toml v0.8.19
       >     Checking two-face v0.4.3
       >     Checking icu_properties v1.5.1
       >     Checking icu_provider_adapters v1.5.0
       >     Checking resvg v0.45.0
       >     Checking wasmi v0.40.0
       >     Checking skrifa v0.32.0
       >     Checking icu_normalizer v1.5.0
       >     Checking idna_adapter v1.2.0
       >     Checking idna v1.0.3
       >     Checking url v2.5.4
       >     Checking hayro-interpret v0.1.0 (https://github.com/LaurenzV/hayro?rev=e701f95#e701f956)
       >     Checking krilla v0.4.0 (https://github.com/LaurenzV/krilla?rev=37b9a00#37b9a00b)
       > error: couldn't read `/nix/store/x1w7fjx8ghwmds52mhjbckvizyfjpsrb-vendor-cargo-deps/3bd5c6ed93a5836821dce76f41c1c6ffde5c2bae3194f6f2b96a1fa66601a59c/hayro-interpret-0.1.0/src/../../assets/CGATS001Compat-v2-micro.icc`: No such file or directory (os error 2)
       >    --> /nix/store/x1w7fjx8ghwmds52mhjbckvizyfjpsrb-vendor-cargo-deps/3bd5c6ed93a5836821dce76f41c1c6ffde5c2bae3194f6f2b96a1fa66601a59c/hayro-interpret-0.1.0/src/color.rs:837:9
       >     |
       > 837 |         include_bytes!("../../assets/CGATS001Compat-v2-micro.icc"),
       >     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >
       >     Checking hayagriva v0.8.1
       >     Checking env_proxy v0.4.1
       >     Checking ureq v2.12.1
       > error: could not compile `hayro-interpret` (lib) due to 1 previous error
       > warning: build failed, waiting for other jobs to finish...
       For full logs, run:
         nix log /nix/store/4cwnqxbdx4cvh0g9sqxxijabwa6r82pk-typst-deps-0.13.1.drv
error: 1 dependencies of derivation '/nix/store/gkx60bnx3b8ny171i2c6mw7xppp8h4fr-typst-0.13.1.drv' failed to build

Similar error when running that same command on my MacBook:

error: builder for '/nix/store/bkm01pswxjm2xi35ygnhdajgr00afyxi-typst-deps-0.13.1.drv' failed with exit code 101;
       last 25 log lines:
       >    Compiling chrono v0.4.39
       >     Checking dirs-sys v0.5.0
       >    Compiling color-print v0.3.7
       >    Compiling clap_complete v4.5.44
       >     Checking hayro-interpret v0.1.0 (https://github.com/LaurenzV/hayro?rev=e701f95#e701f956)
       >     Checking krilla v0.4.0 (https://github.com/LaurenzV/krilla?rev=37b9a00#37b9a00b)
       > error: couldn't read `/nix/store/wiwsjfwq0qhrs9vlydi2bffwj5qrcy2b-vendor-cargo-deps/3bd5c6ed93a5836821dce76f41c1c6ffde5c2bae3194f6f2b96a1fa66601a59c/hayro-interpret-0.1.0/src/../../assets/CGATS001Compat-v2-micro.icc`: No such file or directory (os error 2)
       >    --> /nix/store/wiwsjfwq0qhrs9vlydi2bffwj5qrcy2b-vendor-cargo-deps/3bd5c6ed93a5836821dce76f41c1c6ffde5c2bae3194f6f2b96a1fa66601a59c/hayro-interpret-0.1.0/src/color.rs:837:9
       >     |
       > 837 |         include_bytes!("../../assets/CGATS001Compat-v2-micro.icc"),
       >     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >
       >     Checking xattr v1.4.0
       >     Checking icu_provider_adapters v1.5.0
       >    Compiling typst-render v0.13.1 (/private/tmp/nix-build-typst-deps-0.13.1.drv-0/source/crates/typst-render)
       >    Compiling typst-kit v0.13.1 (/private/tmp/nix-build-typst-deps-0.13.1.drv-0/source/crates/typst-kit)
       >    Compiling typst-pdf v0.13.1 (/private/tmp/nix-build-typst-deps-0.13.1.drv-0/source/crates/typst-pdf)
       >     Checking hypher v0.1.5
       >    Compiling typst v0.13.1 (/private/tmp/nix-build-typst-deps-0.13.1.drv-0/source/crates/typst)
       >     Checking tar v0.4.43
       >    Compiling typst-cli v0.13.1 (/private/tmp/nix-build-typst-deps-0.13.1.drv-0/source/crates/typst-cli)
       >     Checking dirs v6.0.0
       >     Checking ureq v2.12.1
       > error: could not compile `hayro-interpret` (lib) due to 1 previous error
       > warning: build failed, waiting for other jobs to finish...
       For full logs, run:
         nix log /nix/store/bkm01pswxjm2xi35ygnhdajgr00afyxi-typst-deps-0.13.1.drv
error: 1 dependencies of derivation '/nix/store/kj5qymw4i77qi3f101ga58k1ia6ww8gp-typst-0.13.1.drv' failed to build

Same error after cloning the repo and just running nix build in that clone.

Unlike #5904, I don't have any issues building Typst via cargo build in nix develop, either on x86_64-linux or on aarch64-darwin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions