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

Building for Nix results in no GUI #1922

Closed
rschulman opened this issue May 16, 2022 · 4 comments
Closed

Building for Nix results in no GUI #1922

rschulman opened this issue May 16, 2022 · 4 comments

Comments

@rschulman
Copy link

Hello! I'm working on putting together a derivation (build script, essentially) for Nix. The build is currently completing successfully, but the resulting binary is printing to stdout:

 TIC-80 tiny computer
 version 1.0.0 ()
 https://tic80.com (C) 2017-1980

 hello! type help for help
>

but not creating its own window. In addition, typing anything at the prompt results in no response.

I'm guessing that this is being caused by a missing dependency (at least that makes the most sense to me given the circumstances). Anyone have an idea of what might be missing that would cause behavior like this but which would not break the build itself?

Thanks!

@nesbox
Copy link
Owner

nesbox commented May 18, 2022

We use SDL2 lib to render UI, I think SDL2 didn't create the window for some reason.

@joshgoebel
Copy link
Collaborator

@rschulman Any luck on this?

@nesbox nesbox closed this as completed Jan 12, 2023
@44100hertz
Copy link

I still have this issue.

winny- added a commit to winny-/nixos-configs that referenced this issue Apr 28, 2023
This package borrows heavily from
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/SDL2/default.nix
because tic-80 vendors SDL2, which means we need to take care and implemment
a similar environment in tic-80's vendored copy of SDL2.

This also fixes the issue with tic-80 not showing a window.  Using the above
borrowed SDL2 support, tic-80 works just fine.
nesbox/TIC-80#1922
@winny-
Copy link

winny- commented Apr 28, 2023

Hello, this issue is an issue with Nix, not with TIC-80. See my derivation here https://github.com/winny-/nixos-configs/blob/master/package-overrides/tic-80/default.nix

The root cause was due to how Nix handles libraries, and there are documented work arounds in the SDL2 derivation.

This ticket should have been created as a discussion in the Nix Discourse or nixpkgs github repository as it is an issue specific to Nix and packaging Tic-80 on nix.

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

No branches or pull requests

5 participants