Skip to content

ags (unstable): systemtray service not working (missing packages) #306446

Closed

Description

@trm109

Describe the bug

ags (only available on unstable as of 4/23/2024) reports DbusmenuGtk3 missing, making it impossible to use systemtray widgets.

Steps To Reproduce

Steps to reproduce the behavior:

  1. add ags into your environment.systemPackages from the unstable channel.
  2. $ echo 'const systemtray = await Service.import("systemtray")' > config.js
  3. $ ags
(com.github.Aylur.ags:1280775): Gjs-WARNING **: 22:49:04.336: JS ERROR: Error: Requiring DbusmenuGtk3, version none: Typelib file for namespace 'DbusmenuGtk3' (any version) not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:16:28
@gi://DbusmenuGtk3/:3:25
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Expected behavior

ags should report no JS errors, and finish execution (since there is nothing besides an import in step 2).

Screenshots

N/A

Additional context

The official flake version runs fine: nix run github:Aylur/ags

Notify maintainers

@foo-dogsquared

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"'
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.84, NixOS, 23.11 (Tapir), 23.11.20240410.b2cf36f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11, nixos-unstable, unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: bug
    on Apr 24, 2024
  2. zaesur commented on Apr 28, 2024

    @zaesur

    Experienced the same issue, so I played around a bit looking for a solution.

    As a beginner Nix user, I'm using neither flakes nor home manager, to get a feel for everything first. If anyone reading this identifies with this; the solution is to add the following to your configuration.nix:

      nixpkgs.overlays = [
        (final: prev:
        {
          ags = prev.ags.overrideAttrs (old: {
            buildInputs = old.buildInputs ++ [ pkgs.libdbusmenu-gtk3 ];
          });
        })
      ];
    

    In short, we're telling Nix to take the ags derivation, but extend the buildInputs attribute with the required package.

    I would be happy to submit a PR to fix this, but I've compared with the 1.8.0 release and it seems there are more missing build inputs (see https://github.com/Aylur/ags/blob/v1.8.0/nix/default.nix). I'm not sure about the rationale behind these omissions. Perhaps @foo-dogsquared knows more?

  3. trm109 commented on Apr 28, 2024

    @trm109
    Author

    As a beginner Nix user, I'm using neither flakes nor home manager, to get a feel for everything first. If anyone reading this identifies with this; the solution is to add the following to your configuration.nix:

    I'm the same, I'm not planning on using HM until I feel like I've got proficient flakes & the nix language. IIRC, the HM package doesn't have any missing dep issues.

  4. adminy commented on Jul 4, 2024

    @adminy
    Contributor

    same here, there are 2 issues that came up, after missing libdbusmenu-gtk3 package, I was also missing services.upower.enable = true; and gtk3 package. Still no icon theme, the default one is missing all of the example config icons. so also the gnome.adwaita-icon-theme package.

  5. rabejens commented on Oct 3, 2024

    @rabejens

    Experienced the same issue, so I played around a bit looking for a solution.

    As a beginner Nix user, I'm using neither flakes nor home manager, to get a feel for everything first. If anyone reading this identifies with this; the solution is to add the following to your configuration.nix:

      nixpkgs.overlays = [
        (final: prev:
        {
          ags = prev.ags.overrideAttrs (old: {
            buildInputs = old.buildInputs ++ [ pkgs.libdbusmenu-gtk3 ];
          });
        })
      ];
    

    In short, we're telling Nix to take the ags derivation, but extend the buildInputs attribute with the required package.

    I would be happy to submit a PR to fix this, but I've compared with the 1.8.0 release and it seems there are more missing build inputs (see https://github.com/Aylur/ags/blob/v1.8.0/nix/default.nix). I'm not sure about the rationale behind these omissions. Perhaps @foo-dogsquared knows more?

    Even if you are using flakes you can put this snippet into the nix file in which you install ags.

  6. adminy commented on Oct 3, 2024

    @adminy
    Contributor

    overlay overwriting works with flakes, that's what I used to use on my system of flakes.

    I'd say v2 is quite stable, I'd use that instead. the only catch is that there aren't going to be as many examples out there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions