2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, ninja
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "pioasm";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.0.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "pico-sdk";
|
|
|
|
rev = finalAttrs.version;
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-d6mEjuG8S5jvJS4g8e90gFII3sEqUVlT2fgd9M9LUkA=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/tools/pioasm";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D pioasm $out/bin/pioasm
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Assemble PIO programs for Raspberry Pi Pico";
|
|
|
|
homepage = "https://github.com/raspberrypi/pico-sdk";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ emilytrau ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
mainProgram = "pioasm";
|
|
|
|
};
|
|
|
|
})
|