Skip to content

Add Nix as a backend - #126

Closed
matthewbauer wants to merge 1 commit into
PackageKit:masterfrom
matthewbauer:nix
Closed

matthewbauer wants to merge 1 commit into
PackageKit:masterfrom
matthewbauer:nix

Conversation

@matthewbauer

Copy link
Copy Markdown
Collaborator

I'm going to put this here while I'm still working on it to get an early review if you can. I've implemented the barebones PackageKit vfuncs for Nix but it's still pretty buggy. If anyone can correct any obvious errors or issues that would be helpful. Right now, I've just been using pkcon and not any PackageKit GUI, so I'll have to figure that out as well.

@matthewbauer
matthewbauer force-pushed the nix branch 7 times, most recently from ce79146 to 9c28f25 Compare May 23, 2016 20:08
@hughsie

hughsie commented May 24, 2016

Copy link
Copy Markdown
Collaborator

In concept looks good; I'm no C++ programmer but it looks a good start. If you want a real-world application to try, I'd suggest starting with gpk-application and gpk-update-viewer and then progress onto gnome-software. The former is quite demanding for status updates, and the latter needs requests to complete in lightning quick time. Yell if you need any sample AppStream data.

@matthewbauer
matthewbauer force-pushed the nix branch 21 times, most recently from 66a11b1 to ca41502 Compare May 31, 2016 02:23
@matthewbauer matthewbauer changed the title [wip] Add nix. Add nix. May 31, 2016
@matthewbauer
matthewbauer force-pushed the nix branch 9 times, most recently from a124b67 to 4b7acff Compare June 2, 2016 06:03
@matthewbauer

Copy link
Copy Markdown
Collaborator Author

I'm moving this to ready for review because I'm able to get everything working properly in "pkcon" and "gkp-application". There may still be some issues going forward. I'm not sure what your policy for adding new backends are but it's certainly in working condition right now.

I'm going to try to be working on generating the appstream data for NixOS, but it's unclear how to work with the way Nix packages stuff.

@ximion

ximion commented Jun 2, 2016

Copy link
Copy Markdown
Member

As long as the backend is maintained and working, we can have it in master - but talk to @hughsie about it, it might make sense to give you commit access to the repo so you can maintain the backend more easily.

I'm going to try to be working on generating the appstream data for NixOS, but it's unclear how to work with the way Nix packages stuff.

Could you be more specific on that? Probably not the right place here though, a mail to appstream[at]lists.freedesktop.org is probably better (or a bug report against one of the AppStream metadata generators, in case you encounter a specific issue).

@hughsie

hughsie commented Jun 2, 2016

Copy link
Copy Markdown
Collaborator

Agreed, I'd rather you just have commit access if you want to be the maintainer for the nix backend.

@matthewbauer

matthewbauer commented Jun 2, 2016 •

Copy link
Copy Markdown
Collaborator Author

Pinging @edolstra, @domenkozar, @copumpkin for review of Nix related parts. Specifically, whether the "nix_get_all_derivations" and "nix_get_state" are properly working.

@ximion
Well eventually we are going to want to make an "appstream-builder" for the Nix build system that generates the appstream data. The issue right now is that there's not really a good way to tell between "apps" vs "non-apps" in Nix. In fact, there's not really an easy way to even tell what files are in a given derivation. Regardless, I think it's going to be easier getting PackageKit and related packages working first before tackling appstream.

@matthewbauer

matthewbauer commented Jun 2, 2016 •

Copy link
Copy Markdown
Collaborator Author

One more thing for @hughsie:

How is the arch part of "package id" used? Right now the way Nix encodes the "system" it looks like "x86_64-linux" or "i686-linux" while most of the other backends seem to just show "i686" or "x86_64". Is that data used anywhere besides just for display? I could definitely normalize it by removing everything after the "-".

@matthewbauer matthewbauer changed the title Add nix. Add Nix as a backend Jun 2, 2016
@hughsie

hughsie commented Jun 2, 2016

Copy link
Copy Markdown
Collaborator

@matthewbauer I think you can use the arch how you like.

@matthewbauer

Copy link
Copy Markdown
Collaborator Author

Okay, so this should be ready to merge then.

@hughsie

hughsie commented Jun 3, 2016

Copy link
Copy Markdown
Collaborator

I've given you commit access to master. Please push fixes to this backend only directly to master, and cherry pick them back into stable versions as appropriate. For any other fixes in the source tree please just grab a +1 from any of us. Thanks!

@matthewbauer
matthewbauer force-pushed the nix branch 2 times, most recently from 8b3399f to 5ae1bb5 Compare June 3, 2016 23:34
- add in a barebones nix backend
- groups unavailable
- derivations evaluated root user's channel
- installation onto any callee profile
- resolves issue
[#76810](https://bugs.freedesktop.org/show_bug.cgi?id=76810).
@matthewbauer

Copy link
Copy Markdown
Collaborator Author

Okay thanks!

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 this pull request may close these issues.

3 participants