Merge pull request #125501 from musfay/picotool
This commit is contained in:
commit
3fcf9a6af8
3 changed files with 70 additions and 0 deletions
35
pkgs/development/libraries/pico-sdk/default.nix
Normal file
35
pkgs/development/libraries/pico-sdk/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pico-sdk";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "00z160f7ypws5pzp1ql7xrs3gmjcbw6gywnnq2fiwl47940balns";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
31
pkgs/development/tools/picotool/default.nix
Normal file
31
pkgs/development/tools/picotool/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libusb1, pico-sdk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "picotool";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1k5j742sj91akdrgnd3wa5csqb638dgaz0c09zsr22fcqz0qhzig";
|
||||
};
|
||||
|
||||
buildInputs = [ libusb1 pico-sdk ];
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
cmakeFlags = [ "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 ./picotool -t $out/bin
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/raspberrypi/picotool";
|
||||
description = "Tool for interacting with a RP2040 device in BOOTSEL mode, or with a RP2040 binary";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ musfay ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -13761,6 +13761,8 @@ in
|
|||
|
||||
phantomjs2 = libsForQt514.callPackage ../development/tools/phantomjs2 { };
|
||||
|
||||
picotool = callPackage ../development/tools/picotool { };
|
||||
|
||||
pmccabe = callPackage ../development/tools/misc/pmccabe { };
|
||||
|
||||
pkgconf-unwrapped = callPackage ../development/tools/misc/pkgconf {};
|
||||
|
@ -17533,6 +17535,8 @@ in
|
|||
physfs_2
|
||||
physfs;
|
||||
|
||||
pico-sdk = callPackage ../development/libraries/pico-sdk { };
|
||||
|
||||
pipelight = callPackage ../tools/misc/pipelight {
|
||||
stdenv = stdenv_32bit;
|
||||
wine-staging = pkgsi686Linux.wine-staging;
|
||||
|
|
Loading…
Reference in a new issue