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

I can't run nix-gui #270

Open
barinov274 opened this issue May 2, 2022 · 7 comments · May be fixed by #277
Open

I can't run nix-gui #270

barinov274 opened this issue May 2, 2022 · 7 comments · May be fixed by #277

Comments

@barinov274
Copy link

When I attempt to run nix-gui it doesn't run.

[max@nixos:~]$ nix --experimental-features 'nix-command flakes' run github:nix-gui/nix-gui
error: attribute 'defaultApp.x86_64-linux' should have type 'derivation'

[max@nixos:~]$ nix --experimental-features 'nix-command flakes' shell github:nix-gui/nix-gui

[max@nixos:~]$ nix-gui
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/hwm5izlsiwn2dg06ixap2a65fs3h36cp-gvfs-1.50.1/lib/gio/modules/libgvfsdbus.so)
Failed to load module: /nix/store/hwm5izlsiwn2dg06ixap2a65fs3h36cp-gvfs-1.50.1/lib/gio/modules/libgvfsdbus.so
QApplication: invalid style override 'adwaita' passed, ignoring it.
	Available styles: Windows, Fusion
Traceback (most recent call last):
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/graphics/nav_interface.py", line 57, in set_lookup_key
    self.set_option_path(
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/graphics/nav_interface.py", line 91, in set_option_path
    num_children = len(api.get_option_tree().children(option_path, mode="leaves"))
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/utils/cache.py", line 85, in wrapper
    res = function(*args, **kwargs)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/api.py", line 22, in get_option_tree
    return option_tree.OptionTree(
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/option_tree.py", line 68, in __init__
    self._upsert_node_data(
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/option_tree.py", line 99, in _upsert_node_data
    if self._is_attribute_set(parent_option_path) and child_option_path.get_end() != '<name>':
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/option_tree.py", line 120, in _is_attribute_set
    return isinstance(data.get_type(), types.AttrsOfType)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/option_tree.py", line 30, in get_type
    return types.from_nix_type_str(self._type_string)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/types.py", line 31, in from_nix_type_str
    from_nix_type_str(nix_type_str.removeprefix('attribute set of ').removesuffix('s'))
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/types.py", line 58, in from_nix_type_str
    return from_nix_type_str(nix_type_str, or_legal=False)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/options/types.py", line 217, in from_nix_type_str
    raise ValueError(nix_type_str)
ValueError: Nix config atom (null, bool, int, float, str, path or package) or list of Nix config atom (null, bool, int, float, str, path or package)s

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/bin/.nix-gui-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/main.py", line 69, in main
    run_program()
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/main.py", line 50, in run_program
    nix_gui = main_window.NixGuiMainWindow(statemodel)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/graphics/main_window.py", line 17, in __init__
    nav_interface.OptionNavigationInterface(statemodel=statemodel)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/graphics/nav_interface.py", line 39, in __init__
    self.set_lookup_key(starting_lookup_key)
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/graphics/nav_interface.py", line 66, in set_lookup_key
    self.revert_to_previous_lookup_key()
  File "/nix/store/0b0a3l9brj46wm1jya6sc75p4ary19pi-python3.9-nix-gui-0.1.5/lib/python3.9/site-packages/nixui/graphics/nav_interface.py", line 46, in revert_to_previous_lookup_key
    previous_uri = self.uri_stack.pop()
IndexError: pop from an empty deque

[max@nixos:~]$ 

I'm currently using nixos 22.05pre372961.e10da1c7f54 (Quokka)

@em429
Copy link

em429 commented May 22, 2022

Same issue here, running latest unstable

@mikef5378
Copy link

mikef5378 commented Jun 21, 2022

I've had this problem too.
A solution might be covered in the topic:
vinszent/cq-flake@d527bfe
Fixed defaultPackage for newer nix flake versions. #34

The problem was originally described in:
NixOS/nix#6448
[defaultApp should have type 'derivation' - add better error message?] #6448
especially the answer which has this text in it:
For anyone searching for this error due to using nix 2.8 with a flake.nix

@JohnWalkerx
Copy link

JohnWalkerx commented Jul 17, 2022

I downloaded the current main source, extracted it and changed the flake.nix in this line to

#defaultApp = self.apps."${system}".nix-gui;
apps.default = self.apps."${system}".nix-gui;

changed into the directory and run it like this:

nix run .

So it started to download and building (still running).

@JohnWalkerx
Copy link

Oh no, it failed with:

Traceback (most recent call last):
  File "/nix/store/m7mpl6lw0sk412w6r1jb6kka0dfq1m0c-python3.9-nix-gui-0.1.6/bin/.nix-gui-wrapped", line 6, in <module>
    from nixui.main import main
  File "/nix/store/m7mpl6lw0sk412w6r1jb6kka0dfq1m0c-python3.9-nix-gui-0.1.6/lib/python3.9/site-packages/nixui/main.py", line 8, in <module>
    from PyQt5 import QtWidgets
ImportError: /nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/zqnzwvxxsdlgfn3fy7h0c24wqqjkzjf4-libglvnd-1.4.0/lib/libGLX.so.0)

@milahu
Copy link
Contributor

milahu commented Aug 15, 2022

I can't run nix-gui

horrible title

IndexError: pop from an empty deque

duplicate of #267

I downloaded the current main source, extracted it and changed the flake.nix in this line to

#defaultApp = self.apps."${system}".nix-gui;
apps.default = self.apps."${system}".nix-gui;

works for me

glibc-2.32-46/lib/libc.so.6: version `GLIBC_2.34' not found

is usually fixed by updating nixpkgs

@pmarreck
Copy link

same issue. there seems to be a solution provided. is this as simple as someone making a PR?

@bbjubjub2494
Copy link

Someone ran into it on r/NixOS

@bbjubjub2494 bbjubjub2494 linked a pull request Sep 1, 2022 that will close this issue
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 a pull request may close this issue.

7 participants