I’m trying to develop an application with gtk-rs but I’m getting errors such as this when trying to run the default hello world with the gtk-rs package installed.
error
warning: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_PATH="/nix/store/gh8a7n87wjm91bgicchvisykz25gippi-dbus-1.14.8-dev/lib/pkgconfig:/nix/store/c9dqnnhwdy64zqwpjkzk1s81zvz0infj-expat-2.5.0-dev/lib/pkgconfig" "pkg-config" "--libs" "--cflags" "gobject-2.0" "gobject-2.0 >= 2.66"` did not exit successfully: exit status: 1
error: failed to run custom build command for `gobject-sys v0.18.0`
Caused by:
process didn't exit successfully: `/home/carl/Documents/Code/seashell/target/debug/build/gobject-sys-371cc603286ba0d8/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=GOBJECT_2.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning=`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_PATH="/nix/store/gh8a7n87wjm91bgicchvisykz25gippi-dbus-1.14.8-dev/lib/pkgconfig:/nix/store/c9dqnnhwdy64zqwpjkzk1s81zvz0infj-expat-2.5.0-dev/lib/pkgconfig" "pkg-config" "--libs" "--cflags" "gobject-2.0" "gobject-2.0 >= 2.66"` did not exit successfully: exit status: 1
error: could not find system library 'gobject-2.0' required by the 'gobject-sys' crate
This is what my shell.nix looks like:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
dbus
];
nativeBuildInputs = with pkgs.buildPackages; [
pkg-config
dbus
];
}
when I run echo $PKG_CONFIG_PATH it echos nothing