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

Is there any point in using ags bundle in NixOS flake? #266

Closed
3 tasks done
RENOMIZER opened this issue Jan 27, 2025 · 1 comment
Closed
3 tasks done

Is there any point in using ags bundle in NixOS flake? #266

RENOMIZER opened this issue Jan 27, 2025 · 1 comment
Labels
question Further information is requested

Comments

@RENOMIZER
Copy link

RENOMIZER commented Jan 27, 2025

Have you read through the documentation?

Describe your question
The wiki for Astal says that the following piece of code should be added to your flake. As I understand it simply bundles all typescript code in one .js file like and other bundler would.
The wiki then prompts you to run said .js file with gjs -m command. But doing so results in error:

(gjs:70119): Gjs-CRITICAL **: 22:02:05.893: JS ERROR: Error: Requiring Astal, version 4.0: Typelib file for namespace 'Astal', version '4.0' not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
@gi://Astal:3:25


(gjs:70119): Gjs-CRITICAL **: 22:02:05.893: Module file:///home/ccc/.config/ags/bundled.js threw an exception

There was an issue about exactly this problem and the answer was to use this method of bundling that produces a single binary instead of a .js file.
So this begs the question is there even point in using ags bundle on NixOS?

@RENOMIZER RENOMIZER added the question Further information is requested label Jan 27, 2025
@Aylur
Copy link
Owner

Aylur commented Jan 28, 2025

No, there is no point using ags bundle in a terminal on NixOS. Its meant to be used in the builder of a derivation on nix.

As the nix page explains, you have to write a derivation to make gjs aware of the libraries. If you are familiar with nix, you know that you then need to run the produced output ./result/bin/name-of-your-bin instead of the interpreter itself (gjs in this case).
The prompt from the getting started page is for users on non nix systems as running the interpreter by itself will not work without the correct environment setup.

I would expect nix users to know about nix build and nix run and hopefully devshells. If not, the ags home-manager module exists just for those who don't.

@Aylur Aylur closed this as completed Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants