depot/third_party/nixpkgs/pkgs/by-name/pi/pioasm/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

38 lines
808 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, ninja
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pioasm";
version = "2.0.0";
src = fetchFromGitHub {
owner = "raspberrypi";
repo = "pico-sdk";
rev = finalAttrs.version;
hash = "sha256-d6mEjuG8S5jvJS4g8e90gFII3sEqUVlT2fgd9M9LUkA=";
};
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";
};
})