Skip to content
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

shell.nix: update deps, add jlink #444

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 11 additions & 19 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,15 @@ in
python3Full
tockloader
pkgsCross.riscv32-embedded.buildPackages.gcc
];

# Unfortunately, `segger-jlink` has been removed from Nixpkgs due to its
# hard dependency in Qt4, which has multiple security issues and is
# deprecated since a few years now. Efforts exist to bring the package back,
# but for now we don't assume it's available. Once [1] is merged, we can add
# the following back:
#
# buildInputs ++ (lib.optionals withUnfreePkgs [
# segger-jlink
# tockloader.nrf-command-line-tools
# ])
#
# shellHook = ''
# # TODO: This should be patched into the rpath of the respective libraries!
# export LD_LIBRARY_PATH=${pkgs.libusb}/lib:${pkgs.segger-jlink}/lib:$LD_LIBRARY_PATH
# '';
#
# [1]: https://github.com/NixOS/nixpkgs/pull/255185
uncrustify
unzip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are good, though uncrustify in 24.05 is a newer version than the one libtock-c's tools expect, and as a result, ./formal_all.sh sill builds it from source.

] ++ (lib.optionals withUnfreePkgs [
segger-jlink
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh... it still requires export NIXPKGS_ALLOW_INSECURE=1 because JLink relies on some ancient version of Qt. Fine...

tockloader.nrf-command-line-tools
]);

shellHook = ''
# TODO: This should be patched into the rpath of the respective libraries!
export LD_LIBRARY_PATH=${pkgs.libusb}/lib:${pkgs.segger-jlink}/lib:$LD_LIBRARY_PATH
'';
}
Loading