From c5c3be682b0d8af5417e84bab405a7cb50fa038d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= Date: Fri, 4 Jun 2021 13:23:37 +0300 Subject: [PATCH] pico-sdk: init at 1.2.0 --- .../libraries/pico-sdk/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/libraries/pico-sdk/default.nix diff --git a/pkgs/development/libraries/pico-sdk/default.nix b/pkgs/development/libraries/pico-sdk/default.nix new file mode 100644 index 00000000000..3db4ff336ff --- /dev/null +++ b/pkgs/development/libraries/pico-sdk/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 088b49e1038..c3f10fbe072 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17460,6 +17460,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;