nixpkgs-suyu/pkgs/development/libraries/pico-sdk/default.nix
sbock 5a5a16c3e0 pico-sdk: fix homepage link points to pkg source
The homepage linked for the package differed from the actual package
source.
2023-08-13 16:14:11 +02:00

35 lines
1,006 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "pico-sdk";
version = "1.5.1";
src = fetchFromGitHub {
owner = "raspberrypi";
repo = pname;
rev = version;
sha256 = "sha256-JNcxd86XNNiPkvipVFR3X255boMmq+YcuJXUP4JwInU=";
};
nativeBuildInputs = [ cmake ];
# SDK contains libraries and build-system to develop projects for RP2040 chip
# We only need to compile pioasm binary
sourceRoot = "${src.name}/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/pico-sdk";
description = "SDK provides the headers, libraries and build system necessary to write programs for the RP2040-based devices";
license = licenses.bsd3;
maintainers = with maintainers; [ muscaln ];
platforms = platforms.unix;
};
}