2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchgit, wxGTK, libX11, readline }:
|
2014-08-27 11:51:21 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
# BOSSA needs a "bin2c" program to embed images.
|
|
|
|
# Source taken from:
|
|
|
|
# http://wiki.wxwidgets.org/Embedding_PNG_Images-Bin2c_In_C
|
|
|
|
bin2c = stdenv.mkDerivation {
|
|
|
|
name = "bossa-bin2c";
|
|
|
|
src = ./bin2c.c;
|
2019-06-19 16:45:34 +01:00
|
|
|
dontUnpack = true;
|
2021-01-24 09:19:10 +00:00
|
|
|
buildPhase = "cc $src -o bin2c";
|
|
|
|
installPhase = "mkdir -p $out/bin; cp bin2c $out/bin/";
|
2014-08-27 11:51:21 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2018-02-06 04:29:26 +00:00
|
|
|
name = "bossa-1.8";
|
2014-08-27 11:51:21 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://github.com/shumatech/BOSSA";
|
2018-02-06 04:29:26 +00:00
|
|
|
rev = "3be622ca0aa6214a2fc51c1ec682c4a58a423d62";
|
|
|
|
sha256 = "19ik86qbffcb04cgmi4mnascbkck4ynfj87ha65qdk6fmp5q35vm";
|
2014-08-27 11:51:21 +01:00
|
|
|
};
|
|
|
|
|
2014-09-25 21:48:42 +01:00
|
|
|
patches = [ ./bossa-no-applet-build.patch ];
|
|
|
|
|
2014-08-27 11:51:21 +01:00
|
|
|
nativeBuildInputs = [ bin2c ];
|
|
|
|
buildInputs = [ wxGTK libX11 readline ];
|
|
|
|
|
|
|
|
# Explicitly specify targets so they don't get stripped.
|
|
|
|
makeFlags = [ "bin/bossac" "bin/bossash" "bin/bossa" ];
|
2017-09-01 03:44:56 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
2014-08-27 11:51:21 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bin/bossa{c,sh,} $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2014-08-27 11:51:21 +01:00
|
|
|
description = "A flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers";
|
|
|
|
longDescription = ''
|
|
|
|
BOSSA is a flash programming utility for Atmel's SAM family of
|
|
|
|
flash-based ARM microcontrollers. The motivation behind BOSSA is
|
|
|
|
to create a simple, easy-to-use, open source utility to replace
|
|
|
|
Atmel's SAM-BA software. BOSSA is an acronym for Basic Open
|
|
|
|
Source SAM-BA Application to reflect that goal.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.shumatech.com/web/products/bossa";
|
2014-08-27 11:51:21 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|