1 { pkgs ? import <nixpkgs> { }, }:
4 tattlekey = { lib, stdenv, cmake, pico-sdk, python3 }:
8 src = lib.cleanSource ./.;
9 nativeBuildInputs = [ cmake python3 ];
11 "-DCMAKE_C_COMPILER=/usr/bin/arm-none-eabi-gcc"
12 "-DCMAKE_CXX_COMPILER=/usr/bin/arm-none-eabi-c++"
14 "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk"
17 diskImageFormat = "qcow2";
20 pico-sdk = pkgs.pico-sdk.overrideAttrs (old: rec {
22 src = pkgs.fetchFromGitHub {
23 fetchSubmodules = true;
24 owner = "raspberrypi";
27 hash = "sha256-GY5jjJzaENL3ftuU5KpEZAmEZgyFRtLwGVg3W1e/4Ho=";
31 distro = "debian11x86_64";
37 "libnewlib-arm-none-eabi"
38 "libstdc++-arm-none-eabi-newlib"
41 debImage = pkgs.vmTools.diskImageFuns."${distro}" { inherit extraPackages; };
43 in pkgs.vmTools.runInLinuxImage
44 (pkgs.callPackage tattlekey { pico-sdk = pico-sdk; })