nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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-1.8";
18
19 src = fetchgit {
20 url = https://github.com/shumatech/BOSSA;
21 rev = "3be622ca0aa6214a2fc51c1ec682c4a58a423d62";
22 sha256 = "19ik86qbffcb04cgmi4mnascbkck4ynfj87ha65qdk6fmp5q35vm";
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 NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
33
34 installPhase = ''
35 mkdir -p $out/bin
36 cp bin/bossa{c,sh,} $out/bin/
37 '';
38
39 meta = with stdenv.lib; {
40 description = "A flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers";
41 longDescription = ''
42 BOSSA is a flash programming utility for Atmel's SAM family of
43 flash-based ARM microcontrollers. The motivation behind BOSSA is
44 to create a simple, easy-to-use, open source utility to replace
45 Atmel's SAM-BA software. BOSSA is an acronym for Basic Open
46 Source SAM-BA Application to reflect that goal.
47 '';
48 homepage = http://www.shumatech.com/web/products/bossa;
49 license = licenses.bsd3;
50 platforms = platforms.linux;
51 };
52}