Skip to content

Conversation

@jaoleal
Copy link

@jaoleal jaoleal commented Feb 29, 2024

Edit bromeon: copied description from #1068

Case

So, after spending 4 whole days to make the bindgen and the gdnative work on my NixOs i came with a flake that i want to share.
i got fundamental help of my super NixOs-User @storopoli.

Flake

#jaoleal/Uni9Jogo@3dcc053
Its not perfect and theres some diferences of the official one in the book

Cons

  • Does not have support for non-nixos nix environment since it does not include NixGL

Pros

  • Does not have NixGL
  • Will not break with rust updates(the old one did)

Feel free to help improve it

@Bromeon Bromeon changed the title Add Flake Add Flake for NixOS Feb 29, 2024
@Bromeon
Copy link
Member

Bromeon commented Feb 29, 2024

Relevant book page: https://godot-rust.github.io/gdnative-book/recipes/nix-build-system.html

I'm not sure if the repo is the right place for this, especially now that we have it in two places (book + here).

Could you elaborate more concretely how the existing Flake caused problems or what this improves? You mentioned brief pros/cons, but a bit more details would be nice.

Copy link

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

LGTM

@storopoli
Copy link

Could you elaborate more concretely how the existing Flake caused problems or what this improves? You mentioned brief pros/cons, but a bit more details would be nice.

You don't have a Flake. You have a suggested Nix shell that uses the system nixpkg which is not reproducible.
A flake is, since it adds a flake.lock file.
By the way we are missing that here.

Copy link

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

Add the flake.lock file as well for reproducibility

@jaoleal
Copy link
Author

jaoleal commented Feb 29, 2024

Could you elaborate more concretely how the existing Flake caused problems or what this improves? You mentioned brief pros/cons, but a bit more details would be nice.

Well, if you run a NixOs you can try the old one... iven cargo will have some problems because some out of date hardcoded deps, that is the point of the problem that i ran. The flake will do most of the work.

I'm not sure if the repo is the right place for this, especially now that we have it in two places (book + here).

I`ll commit some improves and organization of the flake.

EDIT: Sure, the root of the project isnt the best place for it, so i made the PR directly to the book.

jaoleal added a commit to jaoleal/gdnative-book that referenced this pull request Feb 29, 2024
Updating the shell.nix to a flake.nix. 
See the Issue on gdnative for more understanding

godot-rust/gdnative#1069 (comment)
@Bromeon
Copy link
Member

Bromeon commented Feb 29, 2024

You don't have a Flake. You have a suggested Nix shell that uses the system nixpkg which is not reproducible.

Ah, right. I was confused by this, which implied an existing Flake 🙂

Flake

Its not perfect and theres some diferences of the official one in the book


EDIT: Sure, the root of the project isnt the best place for it, so i made the PR directly to the book.

Thanks, also for the elaboration! I'll close this then, let's continue there.

@Bromeon Bromeon closed this Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants