2014-08-27 11:51:21 +01:00
|
|
|
{ stdenv, fetchgit, wxGTK, libX11, readline }:
|
|
|
|
|
|
|
|
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;
|
|
|
|
unpackPhase = "true";
|
|
|
|
buildPhase = ''cc $src -o bin2c'';
|
|
|
|
installPhase = ''mkdir -p $out/bin; cp bin2c $out/bin/'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2015-06-04 18:22:36 +01:00
|
|
|
name = "bossa-2014-08-18";
|
2014-08-27 11:51:21 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = https://github.com/shumatech/BOSSA;
|
|
|
|
rev = "0f0a41cb1c3a65e909c5c744d8ae664e896a08ac"; /* arduino branch */
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "0xg79kli1ypw9zyl90mm6vfk909jinmk3lnl8sim6v2yn8shs9cn";
|
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/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = http://www.shumatech.com/web/products/bossa;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|