Closed auroraanna closed 11 months ago
Thanks for raising this issue!
I'm not familiar with nix however from the error, it seems that girepository, glib and gobject are not available. Since those depend on the environment (gi-crystal
is the binding generator), I suppose this guide on packaging GNOME apps might come in handy. Also taking a look at other libadwaita nix packages might be helpful!
See: nixpkgs/pika-backup & Onto wrapGAppsHook
Oh openssl is also needed for calculating the hashes (it should be buildInputs = [ openssl ];
(?))
Some other notes on packaging:
-Ddisable_gschema
. The "packaging GNOME apps" nix guide has a section for GSettings.x86_64-linux
.Let me know if there's anything I can do from my side! I can also add a nix
target on the Makefile if it makes maintaining it easier!
Oh openssl is also needed for calculating the hashes (it should be buildInputs = [ openssl ]; (?))
Yes
yeah I forgot wrapGAppsHook
I took a look at some of the .nix files for other programs with wrapGAppsHook and libadwaita but it doesn't help.
I still have no idea how to install lgirepository, libglib and libgobject. I can't find the three of them in any package manager.
I also don't know how to use the bindings for libadwaita when I have them (gi-crystal is needed for generating them?)
I solved shards install
failing by installing gobject-introspection
which provides the libraries. it was even mentioned on https://github.com/GeopJr/libadwaita.cr, sorry…
But there still are some error messages:
shards install
Resolving dependencies
Fetching https://github.com/geopjr/libadwaita.cr.git
Fetching https://github.com/geopjr/gettext.cr.git
Fetching https://github.com/geopjr/non-blocking-spawn.git
Fetching https://github.com/hugopl/gtk4.cr.git
Fetching https://github.com/hugopl/gi-crystal.git
Fetching https://github.com/hugopl/version_from_shard.git
Using version_from_shard (1.2.5)
Installing gi-crystal (0.14.0)
Postinstall of gi-crystal: shards build
Installing gtk4 (0.12.0)
Installing libadwaita (1.0.0 at 72f2e42)
Installing non-blocking-spawn (1.0.5)
Installing gettext (1.0.0)
Shard "gi-crystal" may be incompatible with Crystal 1.2.2
Shard "gtk4" may be incompatible with Crystal 1.2.2
Shard "non-blocking-spawn" may be incompatible with Crystal 1.2.2
Shard "gettext" may be incompatible with Crystal 1.2.2
and
./bin/gi-crystal
info - Starting at 2022-10-10 20:57:59 +02:00, project dir: /home/annaaurora/projects/Collision
info - Generating bindings at /home/annaaurora/projects/Collision/lib/gi-crystal/src/auto
info - Using binding config at /home/annaaurora/projects/Collision/lib/gi-crystal/src/bindings/g_lib/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gi-crystal/src/bindings/g_object/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gtk4/src/bindings/gdk/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gtk4/src/bindings/gio/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gtk4/src/bindings/gsk/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gtk4/src/bindings/gtk/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gtk4/src/bindings/harfbuzz/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/gtk4/src/bindings/pango/binding.yml
info - Using binding config at /home/annaaurora/projects/Collision/lib/libadwaita/src/bindings/binding.yml
fatal - Typelib file for namespace 'Gdk', version '4.0' not found
Shard "gi-crystal" may be incompatible with Crystal 1.2.2
maybe you need to up the crystal version?
All these dependencies (gobject-introspection
, glib
, gdk
) should have been provided by wrapGAppsHook, right?
It also mentions There is also [wrapGAppsHook4]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4.
maybe you need to up the crystal version?
Collision already "requires" (more like suggest) Crystal 1.6.0 but anything above what the shards require should work. Crystal version has to be bumped in nix (seems to be blocked https://github.com/NixOS/nixpkgs/pull/173928).
You can try with 1.2.2, it should still work as expected!
You can try with 1.2.2, it should still work as expected!
Also the binding generation?
Probably. (The above error is on the environment missing Gdk - not the binding generator).
I'm currently trying to fix the nix crystal package so 1.6.0 gets in, you can wait for that I guess. (But still 1.2.2 should still probably work)
It doesn't work. non-blocking-spawn requires >= 1.3.2, < 2.0.0
thanks for trying to update the crystal package
It doesn't work. non-blocking-spawn requires >= 1.3.2, < 2.0.0
Try passing --ignore-crystal-version
on shards install
, if that doesn't work, I can go change the shard requirements as that's mine.
gettext also requires 1.3.2
Also mine, it should work on 1.2.2.
Not sure if it's a good idea for you to set down the requirements. Do your programs have no issues with lower versions?
I think we should wait for the crystal nixpkgs update instead of trying to make this fit.
I agree on waiting, however they should still work. There haven't been that many breaking changes >= 1.0.0. The only reason these shards (including the ones I maintain) have that requirement is that the crystal tool that initializes a new project automatically sets it to the current one.
Describe the bug gi-crystal failed to compile because of missing dependencies that I have no idea how to install:
To Reproduce Steps to reproduce the behavior:
shards install
Expected behavior Alls shards build and install.
Environment:
shards
Additional context I have a suspiscion that this is a NixOS problem. I wanted to
shards install
to get the libadwaita bindings for packaging Collision for nixpkgs.