-
-
Notifications
You must be signed in to change notification settings - Fork 621
Packages (Linux): Improve speed of Guix package detection. #999
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
Conversation
|
What about renaming |
Instead of waiting for guix to parse the manifest file of a profile parse it directly by counting "/gnu/store" entries and fitlering out duplicates. The new implementation now also accounts for propagated-inputs of packages. Co-authored-by: Carter Li <zhangsongcui3371@sina.com>
Done. |
|
Awesome. Thanks again for your help :) |
|
Do you know how can I submit fastfetch to GNU guix repo? |
|
https://guix.gnu.org/manual/devel/en/html_node/Contributing.html. The tldr is: Create a patch for the guix repo and mail it to guix-patches@gnu.org. I have a (somewhat) working package definition locally (which I used to test these changes) but it is a bit thrown together eg fastfetch cant find the extra dependencies at runtime yet. Also almost surely all the vendored dependencies would need to be packaged seperately. |
Good
Maybe CMake failed to find these deps. You need to make sure that CMake prints |
|
cmake/pkgconfig finds them fine during build. |
|
What does |
|
Probably because these are not in the default path? Nix seems to wrap with EDIT: That seems to work. But currently it is a bit ugly as I write out the LD_LIBRARY_PATH manually |
|
Just saw someone submitted fastfetch to guix repo with a few features enabled but no https://git.savannah.gnu.org/cgit/guix.git/commit/?id=ddb0401d82be8b1a43b6f47fb5794d08119f8d54 Does it really work? |
|
I am not quite happy with the package yet. Everything that does not need use the external libraries works. However I am getting some errors when the guix fastfetch tries to dlopen the external libraries: and strace suggests it is the LD_LIBRARY_PATH issue again. Can look into submitting a patch later this week. |
|
I don't like the idea. You shouldn't force people to install wayland if they use only x11. One solution is to set rpath in |
|
I agree, but there is currently no way to declare optional dependencies in guix without creating a seperate package (i.e. fastfetch-wayland, fastfetch-x11, etc but there is a combinatorical explosion going on for all different combinations. Also wrapping with LD_LIBRARARY_PATH would do the same as the resulting store would reference the specifc wayland package. I saw some discussions to create a minimal variant (because there also might be problems with e.g. libnm when someone is using connman instead of networkmanager for networking). But there is then a problem what dependencies (if any?) should be included in such a variant. Some might not use dbus, gsettings or on a server any displayserver at all |
Here is logic of your first code. There was not much I needed to do.
Compared to it I've renamed the argument to
filenameto be more explicit what it acts on, have replaced the lastmemcmpcall withcompare32and added the comment from my first try to try to explain what the code should do.Thanks for helping me with this, I have added you as Co-author because you did almost everything.
Haven't tested how it interacts which edge cases (like malformed manifest files) as these are symlinked from a read-only filesystem and i figured if this happens problems with fastfetch are probably not the top priority.
Speed wise it is now much faster from the 200-300ms total to ~5ms and the count is at a lot more accurate (but still not perfect) as (transitive) dependencies of installed packages are now also counted.
Closes #988.