Skip to content

gi-crystal: init at 0.17.0#243914

Merged
drupol merged 2 commits intoNixOS:masterfrom
sund3RRR:gi-crystal-init
Jul 18, 2023
Merged

gi-crystal: init at 0.17.0#243914
drupol merged 2 commits intoNixOS:masterfrom
sund3RRR:gi-crystal-init

Conversation

@sund3RRR
Copy link
Contributor

Description of changes

GI Crystal is a binding generator used to generate Crystal bindings for GObject based libraries using GObject Introspection.
https://github.com/hugopl/gi-crystal

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/)
  • 23.11 Release Notes (or backporting 23.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
  • Fits CONTRIBUTING.md.

@sund3RRR
Copy link
Contributor Author

To make gi-crystal work in nix environment, several patches had to be made.

  1. Added support for symbolic links for the gi-crystal generator;
  2. Made gi-crystal portable to run from nix-store;
  3. gi-crystal now generates the complete package including self src so you don't need to download it with shards.

Usage is pretty simple:

  1. add gi-crystal to nativeBuildInputs
  2. run gi-crystal in buildPhase to generate all required gobject bindings and copy gi-crystal package.

Example:

nativeBuildInputs = [ "gi-crystal" ];
  
buildPhase = ''
  runHook preBuild
    
  gi-crystal
  shards build --release -s rtfm 

@sund3RRR sund3RRR mentioned this pull request Jul 17, 2023
12 tasks
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jul 17, 2023
@sund3RRR sund3RRR mentioned this pull request Jul 17, 2023
31 tasks
Comment on lines +24 to +25
doCheck = false;
doInstallCheck = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see if we can get tests working by not overwriting the env variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't, it doesn't work. The test rule in the Makefile simply starts generating bindings with custom typelib paths that do not have them, and fails.

@drupol drupol merged commit fd1fd2c into NixOS:master Jul 18, 2023
@sund3RRR sund3RRR mentioned this pull request Jul 29, 2023
12 tasks
@UlyssesZh UlyssesZh mentioned this pull request Apr 20, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants