Kintaro / wtftw

Window Tiling For The Win. A tiling window manager written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to build in nixos

LinArcX opened this issue · comments

Hi. i want to test wtftw in nixos. but i get an error when i want to build it:

╰ cargo build
   Compiling serde_json v1.0.17
   Compiling x11 v2.17.5
   Compiling simplelog v0.5.1
error: failed to run custom build command for `x11 v2.17.5`
process didn't exit successfully: `/home/linarcx/test/wtftw/target/debug/build/x11-74738cdc4c52e6eb/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"x11 >= 1.4.99.1\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package x11 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `x11.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'x11\' found\n" } }', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

have you got X11 libs installed as the error suggests, or pointed the build system to x11.pc?

Project activity aside, @catb0t is on the right track.

Contrary to many other Linux distros, the main user environment in NixOS does not contain idioms such as /usr/lib, /usr/include.

You need to make sure pkgconfig, X11, and related xorg libraries are available to your build environment.

I haven't run-tested it, but nix-shell -p pkgconfig xorg.libXinerama xorg.libX11 --run 'make' at least builds successfully.

Note that make is called rather than cargo build.