You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was trying to create simple project with gtk-rs.
My project consists of hello world application with
[dependencies]
gtk = "0.18.1"
in cargo.toml
I was using nix develop github:cargo2nix/cargo2nix#bootstrap,
$ cargo2nix --version
cargo2nix 0.11.0
I copied the flake from examples and changed the project name and cargo2nix address to make it work. That made it work normally on fresh hello world project.
With the gtk dependency I get this when I try nix develop
$ nix develop
error: builder for '/nix/store/n85pvca4ddp2w5w9b8kxmxy9hxdh3bq6-crate-glib-sys-0.18.1.drv' failed with exit code 101;
last 10 log lines:
> or `pkg install pkg-config`, or `apk add pkgconfig` depending on your distribution.
>
> If you've already installed it, ensure the pkg-config command is one of the
> directories in the PATH environment variable.
>
> If you did not expect this build to link to a pre-installed system library,
> then check documentation of the glib-sys crate for an option to
> build the library from source, or disable features or dependencies
> that require pkg-config.
> /nix/store/wr08yanv2bjrphhi5aai12hf2qz5kvic-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context
For full logs, run 'nix log /nix/store/n85pvca4ddp2w5w9b8kxmxy9hxdh3bq6-crate-glib-sys-0.18.1.drv'.
error: 1 dependencies of derivation '/nix/store/l2fv6hi4dr2q198mbyk1a2fb4qfydk1b-crate-atk-sys-0.18.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/sscvf13175dx4y8zyk5lvsa0yzd0msxy-crate-cairo-sys-rs-0.18.2.drv' failed to build
error: 1 dependencies of derivation '/nix/store/hby9mswa421h2x2gbdr5ssjip94mwffl-crate-gdk-pixbuf-sys-0.18.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7ng58flaxq2afz49zc5b8f855j07gvz0-crate-gdk-sys-0.18.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/079nql3h7dsy6aa8zbxpl9ji8b8kbajh-crate-gio-sys-0.18.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/g3n8z750hfv1nyr2qznwmzv9i5rlqzmx-crate-glib-0.18.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wqzp2shgkjn55hpqrnksrjh485zzwsba-crate-pango-sys-0.18.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wj83567fv88nhaq60jlqrmp9s7m957zj-crate-gtk-0.18.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yc74df61a5qqvzyic8839097cwcpk899-crate-rust-test-0.1.0-env.drv' failed to build
I don't know if it is problem from my side and I need to import the dependencies manually, somehow or if this is really a bug for the project.
I'm new to nix and I'm to setup rust development workflow.
The text was updated successfully, but these errors were encountered:
There is explicit support for pkg-config in cargo2nix that should just work. I tried adding the gtk dependency to the example provided with cargo2nix. With the v0.11.0 tag, compilation succeeds (as long as the necessary development libraries are installed). With the current release-0.11.0 branch, compilation fails with a similar message. I guess that issue can be bisected.
I was wrong about the v0.11.0 release, it fails to compile gtk as well, but with a different error. In v0.11.0, pkg-config fails to find glib-2.0. In release-0.11.0, the pkg-config itself cannot be found. That error is introduced in 2ae2f57.
I would suggest that you try some other solution in the meantime (crane or crate2nix perhaps). This project needs a serious cleanup, and even then, I expect it to be in maintenance mode, i.e. primarily fixing regressions for the existing users.
Hello, I was trying to create simple project with gtk-rs.
My project consists of hello world application with
in
cargo.toml
I was using
nix develop github:cargo2nix/cargo2nix#bootstrap
,I copied the flake from examples and changed the project name and cargo2nix address to make it work. That made it work normally on fresh hello world project.
With the gtk dependency I get this when I try
nix develop
I don't know if it is problem from my side and I need to import the dependencies manually, somehow or if this is really a bug for the project.
I'm new to nix and I'm to setup rust development workflow.
The text was updated successfully, but these errors were encountered: