at 15.09-beta 51 lines 1.6 kB view raw
1{ stdenv, fetchgit, wxGTK, libX11, readline }: 2 3let 4 # BOSSA needs a "bin2c" program to embed images. 5 # Source taken from: 6 # http://wiki.wxwidgets.org/Embedding_PNG_Images-Bin2c_In_C 7 bin2c = stdenv.mkDerivation { 8 name = "bossa-bin2c"; 9 src = ./bin2c.c; 10 unpackPhase = "true"; 11 buildPhase = ''cc $src -o bin2c''; 12 installPhase = ''mkdir -p $out/bin; cp bin2c $out/bin/''; 13 }; 14 15in 16stdenv.mkDerivation rec { 17 name = "bossa-2014-08-18"; 18 19 src = fetchgit { 20 url = https://github.com/shumatech/BOSSA; 21 rev = "0f0a41cb1c3a65e909c5c744d8ae664e896a08ac"; /* arduino branch */ 22 sha256 = "01y8r45fw02rps9q995mv82bxrm6p0mysv4wir5glpagrhnyw7md"; 23 }; 24 25 patches = [ ./bossa-no-applet-build.patch ]; 26 27 nativeBuildInputs = [ bin2c ]; 28 buildInputs = [ wxGTK libX11 readline ]; 29 30 # Explicitly specify targets so they don't get stripped. 31 makeFlags = [ "bin/bossac" "bin/bossash" "bin/bossa" ]; 32 33 installPhase = '' 34 mkdir -p $out/bin 35 cp bin/bossa{c,sh,} $out/bin/ 36 ''; 37 38 meta = with stdenv.lib; { 39 description = "A flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers"; 40 longDescription = '' 41 BOSSA is a flash programming utility for Atmel's SAM family of 42 flash-based ARM microcontrollers. The motivation behind BOSSA is 43 to create a simple, easy-to-use, open source utility to replace 44 Atmel's SAM-BA software. BOSSA is an acronym for Basic Open 45 Source SAM-BA Application to reflect that goal. 46 ''; 47 homepage = http://www.shumatech.com/web/products/bossa; 48 license = licenses.bsd3; 49 platforms = platforms.linux; 50 }; 51}