Skip to content

Fixing the nix flake build due to missing depedency. - #27

Closed
nikore wants to merge 1 commit into
LightforgeProject:mainfrom
nikore:fix_nis_flake_build
Closed

nikore wants to merge 1 commit into
LightforgeProject:mainfrom
nikore:fix_nis_flake_build

Conversation

@nikore

@nikore nikore commented Nov 9, 2026

Copy link
Copy Markdown

Hello!

When trying to build the flake I get the following error:

error: Cannot build '/nix/store/y5lj1w3335mxb6dxpznl0h04fabim1i8-lightforge-1.0.0-beta.11.drv'.
       Reason: builder failed with exit code 101.
       Output paths:
         /nix/store/gh0g0a042365rngrfzras1aa4zibwv76-lightforge-1.0.0-beta.11
       Last 25 log lines:
       >   cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
       >
       >   --- stderr
       >
       >   thread 'main' (2407) panicked at /build/cargo-vendor-dir/zstd-sys-2.1.2+zstd.1.5.7/build.rs:231:10:
       >   Can't probe for zstd in pkg-config:
       >   pkg-config exited with status code 1
       >   > PKG_CONFIG_PATH=/nix/store/kwas12i61rk5d6ilfz9hiala1fawjs2r-systemd-minimal-libs-262-dev/lib/pkgconfig:/nix/store/kwas12i61rk5d6ilfz9hiala1fawjs2r-systemd-minimal-libs-262-dev/share/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --static --libs --cflags libzstd
       >
       >   pkg-config output:
       >     Package libzstd was not found in the pkg-config search path.
       >     Perhaps you should add the directory containing `libzstd.pc'
       >     to the PKG_CONFIG_PATH environment variable
       >     No package 'libzstd' found
       >
       >   The system library `libzstd` required by crate `zstd-sys` was not found.
       >   The file `libzstd.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
       >   PKG_CONFIG_PATH contains the following:
       >       - /nix/store/kwas12i61rk5d6ilfz9hiala1fawjs2r-systemd-minimal-libs-262-dev/lib/pkgconfig
       >       - /nix/store/kwas12i61rk5d6ilfz9hiala1fawjs2r-systemd-minimal-libs-262-dev/share/pkgconfig
       >
       >   HINT: you may need to install a package such as libzstd, libzstd-dev or libzstd-devel.
       >
       >   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To fix that, I added zstd to the list of build deps so the native c bindings are available to meet the requirement of zstd-sys

after that I was able to build and run the newest lightforge. Thanks for this project! It much nicer than running battle.net via wine.

@simplykenny

Copy link
Copy Markdown
Member

hey, i will check this today

@simplykenny

Copy link
Copy Markdown
Member

Thanks for tracking this down! The same fix (zstd in buildInputs, since Nix now sets ZSTD_SYS_USE_PKG_CONFIG) came in through a Nix patch series alongside a CLI-only package and a weekly CI build of the flake, so I'm closing this one. It'll be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants