snowfallorg / nix-software-center

A simple gtk4/libadwaita software center to easily install and manage nix packages
GNU General Public License v3.0
560 stars 16 forks source link

"Could not load new packages" #1

Open mitchmindtree opened 1 year ago

mitchmindtree commented 1 year ago

Hey great to see something like this started, the app looks beautiful from the screenshots!

I had a go at running it, but to no luck:

Screenshot from 2022-09-09 13-50-38

Some notes:

tejing1 commented 1 year ago

Same issue, my system config is also a flake, and not at /etc/nixos, though nixos-rebuild finds it properly through the symlink I placed at /etc/nixos/flake.nix. It might also be relevant here that I don't have any channels, instead handling NIX_PATH through my config flake setup. (so <nixpkgs> does resolve on my system, just not through channels)

mitchmindtree commented 1 year ago

It might also be relevant here that I don't have any channels, instead handling NIX_PATH through my config flake setup.

Likewise, fwiw.

pupbrained commented 1 year ago

Same issue here, I have my nixos configuration as a flake in my home directory.

vlinkz commented 1 year ago

Just pushed some changes with a new welcome screen that allows you to choose your config locations. It should be able to detect that you don't have your configs in the default location and prompt you next time your run the application. Hopefully, it works for all of you, and thanks for the report! (Also I'll make a new tag release soon after fixing some other bugs) Screenshot from 2022-09-12 18-09-23

tejing1 commented 1 year ago

Tried the new version, but even when I manually point it at my flake.nix and one of the modules in my config (I have it split up into multiple files), it still fails in exactly the same way. Still thinking the issue has to do with me not using channels.

vlinkz commented 1 year ago

@tejing1 Should be fixed in the latest tag release

tejing1 commented 1 year ago

Afraid not. I tried both master (8a6810fe089f78c01b3fe6eee78d4115ffc7eb70) and 0.0.3, and I tried removing ~/.cache/nix-software-center just in case, but I still get the same error.

vlinkz commented 1 year ago

Weird, any output from RUST_LOG=nix_software_center=trace nix-software-center? Also maybe try also removing ~/.config/nix-software-center and setup your flake.nix and configuration.nix from the welcome screen again

tejing1 commented 1 year ago
$ RUST_LOG=nix_software_center=trace nix run github:vlinkz/nix-software-center/0.0.3
 DEBUG nix_software_center::ui::window > Got config: NscConfig { systemconfig: Some("/mnt/persist/tejing/flake/nixosConfigurations/tejingdesk/tejing.nix"), flake: Some("/mnt/persist/tejing/flake/flake.nix"), flakearg: None }
 DEBUG nix_software_center::ui::window > userpkgtype: Profile
 DEBUG nix_software_center::ui::window > syspkgtype: Flake
 INFO  nix_software_center::ui::windowloading > WindowAsyncHandlerMsg::CheckCache
 INFO  nix_software_center::parse::cache      > Setting up flake cache
 INFO  nix_software_center::parse::cache      > NEW REV: 13cbe534ebe63a0bc2619c57661a2150569d0443
 TRACE nix_software_center::parse::cache      > Downloading https://channels.nixos.org/nixos-22.05/packages.json.br
 TRACE nix_software_center::parse::cache      > Finished downloading https://channels.nixos.org/nixos-22.05/packages.json.br -> /home/tejing/.cache/nix-software-center/packages.json
 INFO  nix_software_center::parse::cache      > Setting up profile package cache
 INFO  nix_software_center::parse::cache      > PROFILE REV c4d0026e7346ad2006c2ba730d5a712c18195aab
 TRACE nix_software_center::parse::cache      > Downloading https://channels.nixos.org/nixpkgs-22.05/packages.json.br
 TRACE nix_software_center::parse::cache      > Finished downloading https://channels.nixos.org/nixpkgs-22.05/packages.json.br -> /home/tejing/.cache/nix-software-center/profilepackages.json
 INFO  nix_software_center::parse::packages   > Reading package list
 TRACE nix_software_center::parse::packages   > Reading packages.json
 WARN  nix_software_center::ui::windowloading > FAILED TO LOAD PKGS
 WARN  nix_software_center::ui::windowloading > Serde("missing field `github`") at character 0 ('💩')

I also tried re-selecting the files, nothing different.

vlinkz commented 1 year ago

Found an error in cache downloading based on that log. Hopefully, the new master (b1a89ece314d9a9757d764d4038a9e849db5b280) should work 🤞🏽

tejing1 commented 1 year ago

Nope. Same error, same trace output from b1a89ece314d9a9757d764d4038a9e849db5b280.

EDIT: almost the same trace output. the second download comes from https://channels.nixos.org/nixpkgs-unstable/packages.json.br instead of 22.05

vlinkz commented 1 year ago

Should now actually be fixed in the latest commit. Seems like the 22.05 packages.json has some malformed maintainers sections for a few packages, so added a filter that should mitigate the issue

tejing1 commented 1 year ago

630a718baca2c49f98e5e53b99c348c18752be00 does successfully start for me. :tada:

Birdthatcantfly commented 1 year ago

I got an error on the nixos-unstable-small. ERROR nix_software_center::parse::cache > Failed to download https://releases.nixos.org/nixos/unstable/nixos-22.11pre413099.bd9f4f3ae03/packages.json.br But after switching to nixos-unstable everything works.