2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "stm32flash";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-7ptA1NPlzSi5k+CK4qLDxVm2vqhzDNfh1Acn3tsd2gk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Manually copy, make install copies to /usr/local/bin
|
|
|
|
mkdir -pv $out/bin/
|
|
|
|
cp stm32flash $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open source flash program for the STM32 ARM processors using the ST bootloader";
|
|
|
|
homepage = "https://sourceforge.net/projects/stm32flash/";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all; # Should work on all platforms
|
2020-05-15 21:57:56 +00:00
|
|
|
maintainers = with maintainers; [ elitak ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|