-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
45 lines (43 loc) · 1.51 KB
/
Copy pathflake.nix
File metadata and controls
45 lines (43 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
description = "Pico development shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
gdb-multiarch = pkgs.runCommand "gdb-multiarch" {} ''
mkdir -p $out/bin
ln -s ${pkgs.gdb}/bin/gdb $out/bin/gdb-multiarch
'';
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
vscode
libusb1 # Needed by picotool
hidapi # Needed by picotool
ninja
cmake
python3
udisks # Interact with bootloader filesystem
tio # terminal program to interface with serial
llvmPackages_19.clang-tools # clang-format, clang-tidy
libftdi1 # Pico vscode extension
git
gdb
gdb-multiarch
];
# We don't install the pico sdk here; that should be handled by the
# Pico VS Code extension
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [ pkgs.libusb1 pkgs.hidapi pkgs.libftdi1 pkgs.stdenv.cc.cc.lib ]}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
'';
};
});
}