add stlink-tool

This commit is contained in:
Artemis Tosini 2024-03-27 22:03:58 +00:00
parent 37776fcf8c
commit d6b550bc98
Signed by: artemist
GPG key ID: EE5227935FE3FF18
2 changed files with 22 additions and 0 deletions

View file

@ -43,6 +43,7 @@
hactoolnet = final.callPackage ./packages/hactoolnet { };
ipsw = final.callPackage ./packages/ipsw { };
jlink = final.callPackage ./packages/jlink { };
stlink-tool = final.callPackage ./packages/stlink-tool { };
zephyrPackages = final.callPackage ./packages/zephyr { };
inherit (final.python3.pkgs) axicli vpype;

View file

@ -0,0 +1,21 @@
{ stdenv, fetchFromGitHub, pkg-config, libusb1 }:
stdenv.mkDerivation rec {
pname = "stlink-tool";
version = "unstable-2024-01-31";
src = fetchFromGitHub {
owner = "blackmagic-debug";
repo = pname;
fetchSubmodules = true;
rev = "dff59ad2d9986b147076e3098c360656f9b22d65";
hash = "sha256-Jv2W3tpCDMfHSXXCxtdkUQ+TRhUYv5qkCAU7r186+8U=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ];
installPhase = ''
mkdir -p $out/bin
cp stlink-tool $out/bin
'';
}