nixpkgs/pkgs/development/libraries/pico-sdk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1001 B
Nix
Raw Normal View History

2021-06-04 10:23:37 +00:00
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "pico-sdk";
2022-05-29 17:33:21 +00:00
version = "1.3.1";
2021-06-04 10:23:37 +00:00
src = fetchFromGitHub {
owner = "raspberrypi";
repo = pname;
rev = version;
2022-05-29 17:33:21 +00:00
sha256 = "sha256-Yf3cVFdI8vR/qcxghcx8fsbYs1qD8r6O5aqZ0AkSLDc=";
2021-06-04 10:23:37 +00:00
};
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;
2022-01-27 07:48:49 +00:00
maintainers = with maintainers; [ muscaln ];
2021-06-04 10:23:37 +00:00
platforms = platforms.unix;
};
}