-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
packagekit: update to flakes branch #94055
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
I'm noticing something inside packagekit |
I've tried it in a VM.
I was able to start celluloid. I noticed two things atm:
Haven't tried gui's like gnome-software yet, though, I'm betting they will be broken. Will try to get good backtraces when I get to test it more and probably run into some crashes. |
Unrelated nit in the PR, |
Yeah the recurseForDerivations feature is missing. It's easy to add though since
I had install / remove working, but there may be an issue if the thing installed is a different path than what's in nixpkgs. I'll take a look. |
I just tried gnome-packagekit, and it works fairly well. There's probably some polishing that could make it a bit better, but it can do basic search & install. As for GNOME Software, we need indexing of metainfo to get the prettier displays (#15932). I'm not sure if it shows anything without that. |
I'm curious what the state of this is, it's not obvious from looking at the various issues. It seems to me that this is a great boon for increasing the NixOS userbase? |
Yep! The main thing holding it back is that Nix with caching support is not officially released. I'm hoping that happens soon and we can start merging this and the packagekit PR. |
I marked this as stale due to inactivity. → More info |
@matthewbauer with nix 2.4 released, should this PR process continue? I'd like to have this feature. |
@worldofpeace Care to review again? It should be ready to go now that the work is merged upstream. |
worldofpeace left the project. maybe someone else can review it? i don't see any obvious issue, but i don't know much about packagekit can it already be tested? what should work after this PR? |
"--enable-introspection" | ||
"--disable-offline-update" | ||
"--localstatedir=/var" | ||
"--sysconfdir=/etc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it use configs from /etc? Where should the state be stored?
I can't figure out how it does installs, does it manage the user profile via nix-env?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
State should go to localstatedir
(which suffers from the same issue as sysconfdir
). Though I would expect it to be mostly stateless (maybe there are some caches).
Tried it in a GNOME VM --- a/nixos/modules/services/x11/desktop-managers/gnome.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome.nix
@@ -532,9 +532,6 @@ in
simple-scan
totem
yelp
- ] ++ lib.optionals config.services.flatpak.enable [
- # Since PackageKit Nix support is not there yet,
- # only install gnome-software if flatpak is enabled.
gnome-software
])
config.environment.gnome.excludePackages; and got a crash on startup (probably triggered by GNOME Software):
We might want to add |
That was a bug in my packagekit code - there's an assert that we don't want : https://github.com/PackageKit/PackageKit/blob/main/backends/nix/pk-backend-nix.cc#L244 Should be fixed ! |
Can confirm Can confirm the following works:
Had to increase the VM memory limit (get-packages froze on 2G). Can you please rebase/squash? |
6bb1e3b
to
714abd9
Compare
Fixes NixOS#21230 Use Nix backend for packagekit. Updates to version with my Nix backend for PackageKit.
714abd9
to
92a6ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
This is causing some troubles because it’s relying on the unstable Nix C++ api and is broken with the latest unstable Nix − meaning that it’s not possible to build a system with gnome and the latest Nix anymore. Is there any strong reason for making the Nix support mandatory and on-by-default? |
@thufschmitt PackageKit is pretty much useless for us without Nix support. And Nix does not really allow us to enable optional features deep in dependency closure easily. |
This is most of the way toward
#21230. We will need a new Nix
release and some more extensive testing before merging it into
PackageKit.
Upstream branch: PackageKit/PackageKit#414
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)