raspi-utils: init at 0-unstable-2025-10-02#449925
raspi-utils: init at 0-unstable-2025-10-02#449925GiggleSquid wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
|
RossSmyth
left a comment
There was a problem hiding this comment.
Good start, but most of these utilities wouldn't be usable on all systems. Needs:
- provide executable in buildInput to patch shebangs of some of the executables so they run at all on NixOS
- Patch the locations of executables to the nix store
- Either optionally or unconditoinally add gnutls so the crypto util can be build
- Add dtc to build inputs so libfdt can be accessed.
| (lib.cmakeBool "ARM64" stdenv.hostPlatform.isAarch64) | ||
| (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}") | ||
| ]; | ||
|
|
There was a problem hiding this comment.
Or double-check that it is installed in the correct (for Nixpkgs) location.
| installShellCompletion --cmd vcgencmd \ | |
| vcgencmd/vcgencmd-completion.bash | |
| ''; |
There was a problem hiding this comment.
I've worked on all the other suggestions, but you'll have to forgive me, I don't understand this one.
Could you explain it a bit more please?
There was a problem hiding this comment.
The completions for pinctrl and vcgencmd end up in share/bash-completion/completions/ (which is correct), but they don't have a .bash extension - is that okay?
There was a problem hiding this comment.
I'm not completely sure, the file will end up in the /run/current-system/etc/bash-completion directory, but will bash still use it without an extension? If so then seems fine to me.
| rev = "9f61b87db715fe9729305e242de8412d8db4153c"; | ||
| hash = "sha256-LAEAjxb6+lQKo2VUknkuZa5sK37k6SjF+imj/7qyOe4="; | ||
| }; | ||
|
|
There was a problem hiding this comment.
There are several places that need patching to access dtc correctly. kdtc, dtmerge, and overlaycheck (possibly).
There was a problem hiding this comment.
Would you (or @SFrijters) be able to test this for me? I don't currently have the appropriate machines spare to test myself.
I've only gone so far as to simply execute the binaries once.
There was a problem hiding this comment.
I'm doing some testing at the moment, adding @RossSmyth 's suggestions.
Would patching be preferred over wrapProgram? It looks like overlaycheck is doing some more complicated stuff so patching may be needed anyway, but kdtc is just calling 'dtc', so if it's on the PATH that could be enough?
There was a problem hiding this comment.
I generally preferring patching but if there is a lot of stuff to patch then don't waste your time and just wrap (use makeBinaryWrapper)
|
Maybe more after it asked for sudo and I aborted it. |
|
|
|
Getting aggravated with the slow Pi and testing cycle for now, feel free to take inspiration from my WIP fixup commit at https://github.com/SFrijters/nixpkgs/tree/raspi-utils . |
06017cc to
a87ef10
Compare
|
I've pushed to get some of the suggestions closed. Seems this will definitely be more complex than I initially thought! But it does need to be done right. And I suspect this will continue to require more testing and iteration |
Hm maybe just not package that utility? Seems pretty raspbian-specific since if you are running NixOS on your pi then you may not be using sudo or apt. |
|
I made another commit to https://github.com/SFrijters/nixpkgs/tree/raspi-utils which uses a patch / Remaining problem: the current implementation does not work because of infinite recursion - is it possible to defer to the
|
No, but you can use |
|
@RossSmyth Right, thanks, I knew there was something I was forgetting. In this case though it seems I have to jump through an additional hoop - it works but a pointer to a cleaner way would be appreciated. @GiggleSquid Other than that, my branch so far is my best effort at finding and patching the paths to external executables - I've never used the new executables for anything myself, so maybe I missed a code path somewhere. |
Part of #449772
Adds
raspi-utils, a replacement forlibraspberrypi.The rpi userland repo was archived 2025-07-27: https://github.com/raspberrypi/userland
This contained mostly proprietary VideoCore APIs (alongside rpi hardware tools).
Other rpi hardware tools were moved to the utils repo: https://github.com/raspberrypi/utils
After 25.11
libraspberrypiwill be deprecated in favor ofraspi-utils@dezgeg @tkerber Please let me know if you wish to be maintainers for this package as your were both maintainers for
libraspberrypi.@SFrijters Please let me know if you wish to be a maintainer as well, as this was mostly your idea.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.