depot/third_party/nixpkgs/pkgs/development/libraries/pico-sdk/default.nix
Default email 792b51d22f Project import generated by Copybara.
GitOrigin-RevId: d5f237872975e6fb6f76eef1368b5634ffcd266f
2022-02-20 05:27:41 +00:00

35 lines
1,000 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "pico-sdk";
version = "1.3.0";
src = fetchFromGitHub {
owner = "raspberrypi";
repo = pname;
rev = version;
sha256 = "sha256-cc1UTc1aswtJzuaUdYNcCzLtQ9+Wggiy/eRE+UoxSgE=";
};
nativeBuildInputs = [ cmake ];
# SDK contains libraries and build-system to develop projects for RP2040 chip
# We only need to compile pioasm binary
sourceRoot = "source/tools/pioasm";
installPhase = ''
runHook preInstall
mkdir -p $out/lib/pico-sdk
cp -a ../../../* $out/lib/pico-sdk/
chmod 755 $out/lib/pico-sdk/tools/pioasm/build/pioasm
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/raspberrypi/picotool";
description = "SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices";
license = licenses.bsd3;
maintainers = with maintainers; [ musfay ];
platforms = platforms.unix;
};
}