1 { pkgs ? import <nixpkgs> { }, }:
3 cc = pkgs.pkgsCross.arm-embedded.stdenv.cc;
4 tattlekey = { lib, stdenv, cmake, pico-sdk, python3 }:
8 src = lib.cleanSource ./.;
9 nativeBuildInputs = [ cmake python3 ];
11 "-DCMAKE_C_COMPILER=${cc}/bin/arm-none-eabi-cc"
12 "-DCMAKE_CXX_COMPILER=${cc}/bin/arm-none-eabi-c++"
14 "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk"
15 "-DPICO_TOOLCHAIN_PATH=${cc}/bin"
19 pico-sdk = pkgs.pico-sdk.overrideAttrs (old: rec {
21 src = pkgs.fetchFromGitHub {
22 fetchSubmodules = true;
23 owner = "raspberrypi";
26 hash = "sha256-GY5jjJzaENL3ftuU5KpEZAmEZgyFRtLwGVg3W1e/4Ho=";
30 in pkgs.callPackage tattlekey { inherit pico-sdk; }