Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collision: init at 3.3.1 #195395

Closed
wants to merge 1 commit into from
Closed

Conversation

auroraanna
Copy link
Contributor

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@auroraanna auroraanna added the 2.status: blocked by pr/issue Another PR or issue is preventing this from being completed label Oct 10, 2022
@auroraanna
Copy link
Contributor Author

Blocked by: #173928

@auroraanna
Copy link
Contributor Author

> 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
> ./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

… when trying to generate the libadwaita bindings how https://github.com/GeopJr/libadwaita.cr suggests. Currently the crystal in nixpkgs is only 1.2, that's why the warnings are these and might be the cause of the fatal error. Trying again when crystal is updated.

@BenediktBroich BenediktBroich mentioned this pull request Dec 28, 2022
31 tasks
pkgs/tools/security/collision/default.nix Outdated Show resolved Hide resolved
pkgs/tools/security/collision/default.nix Outdated Show resolved Hide resolved
pkgs/tools/security/collision/default.nix Outdated Show resolved Hide resolved
@auroraanna auroraanna changed the title collision: init at 3.1.0 collision: init at 3.3.1 Dec 28, 2022
@auroraanna
Copy link
Contributor Author

So, it build now but the executable in the result is crystal

@auroraanna
Copy link
Contributor Author

oh, forgot my comments about the bindings…

@auroraanna
Copy link
Contributor Author

Now blocked by: #195606

@GeopJr
Copy link
Member

GeopJr commented Jan 20, 2023

It should not be blocked anymore!

@auroraanna
Copy link
Contributor Author

$ nix-build . -A collision
this derivation will be built:
  /nix/store/4wwwj11zg4b29v8j9l4837294a2ii2j5-collision-3.4.0.drv
building '/nix/store/4wwwj11zg4b29v8j9l4837294a2ii2j5-collision-3.4.0.drv'...
unpacking sources
unpacking source archive /nix/store/cdshxn9jll38z93k6hc0lqrrlskiwvln-source
source root is source
patching sources
configuring
building
shards install
Resolving dependencies
Fetching https://github.com/geopjr/libadwaita.cr.git
Fetching https://github.com/geopjr/non-blocking-spawn.git
Fetching https://github.com/geopjr/gettext.cr.git
Failed to clone https://github.com/geopjr/gettext.cr.git
make: *** [Makefile:9: bindings] Error 1
/nix/store/chilfhdcsnmwjl7igrw26j1lrc0zar35-stdenv-linux/setup: line 129: pop_var_context: head of shell_variables not a function context

I don't understand this error.

@auroraanna
Copy link
Contributor Author

Can the shards install from make bindings be removed somehow? The isn't supposed to be downloads in the build phases.

@GeopJr
Copy link
Member

GeopJr commented Jan 20, 2023

Is this better (as to not break existing scripts using it)? GeopJr/Collision@f9dec3a

edit:
Otherwise, you might have better luck manually running the commands you need (the makefile was mostly written for users), like the AUR package and the flatpak do:

# Assuming you have installed the shards already and the binding generator has been built
./bin/gi-crystal
shards build -Dpreview_mt --release --no-debug # or "crystal build ./src/collision.cr -Dpreview_mt --release --no-debug" to skip the shard check if the environment doesn't have network access - beware, the output location will be `./collision` instead

# anything else that you need to compile & install (translations, .desktop files, metainfo)

@auroraanna
Copy link
Contributor Author

So, shards install builds the binding generator? Or is there a seperate command for that?

@GeopJr
Copy link
Member

GeopJr commented Jan 21, 2023

shards install installs the shards, one of which is the bindings generator which has a postinstall script that builds itself. I am not sure if crystal2nix does run the postinstall scripts.

On the flatpak - that doesn't have internet access during the build process and shards are cloned manually (instead of using the shards tool) - I build the bindings generator manually:

- cd lib/gi-crystal && crystal build src/generator/main.cr && cd ../.. && mkdir ./bin && cp lib/gi-crystal/main ./bin/gi-crystal
- ./bin/gi-crystal

@auroraanna
Copy link
Contributor Author

Closing since #242681 has been merged.

@auroraanna auroraanna closed this Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: blocked by pr/issue Another PR or issue is preventing this from being completed 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants