2013-03-25 15:28:09 +01:00
|
|
|
{ stdenv, fetchurl, buildPythonPackage, pythonPackages, minicom
|
|
|
|
, avrdude, arduino_core, avrgcclibc }:
|
2012-11-28 02:55:24 +01:00
|
|
|
|
2013-08-15 23:14:36 +02:00
|
|
|
buildPythonPackage rec {
|
2013-11-26 23:55:31 +01:00
|
|
|
name = "ino-0.3.6";
|
2012-11-28 02:55:24 +01:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2013-08-15 23:14:36 +02:00
|
|
|
url = "http://pypi.python.org/packages/source/i/ino/${name}.tar.gz";
|
2013-11-26 23:55:31 +01:00
|
|
|
sha256 = "0k6lzfcn55favbj0w4afrvnmwyskf7bgzg9javv2ycvskp35srwv";
|
2012-11-28 02:55:24 +01:00
|
|
|
};
|
|
|
|
|
2012-12-01 03:00:45 +01:00
|
|
|
# TODO: add avrgcclibc, it must be rebuild with C++ support
|
2013-03-25 15:28:09 +01:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[ arduino_core avrdude minicom pythonPackages.configobj
|
|
|
|
pythonPackages.jinja2 pythonPackages.pyserial ];
|
2012-11-28 02:55:24 +01:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
echo "Patching Arduino distribution path"
|
2013-03-25 15:28:09 +01:00
|
|
|
sed -i 's@/usr/local/share/arduino@${arduino_core}/share/arduino@g' \
|
|
|
|
ino/environment.py
|
|
|
|
sed -i -e 's@argparse@@' -e 's@ordereddict@@' \
|
|
|
|
requirements.txt
|
|
|
|
sed -i -e 's@from ordereddict@from collections@' \
|
|
|
|
ino/environment.py ino/utils.py
|
2013-08-15 23:14:36 +02:00
|
|
|
|
|
|
|
# Patch the upload command so it uses the correct avrdude
|
|
|
|
substituteInPlace ino/commands/upload.py \
|
|
|
|
--replace "self.e['avrdude']" "'${avrdude}/bin/avrdude'" \
|
|
|
|
--replace "'-C', self.e['avrdude.conf']," ""
|
2012-11-28 02:55:24 +01:00
|
|
|
'';
|
2013-10-08 11:05:19 +02:00
|
|
|
|
2012-11-28 02:55:24 +01:00
|
|
|
meta = {
|
|
|
|
description = "Command line toolkit for working with Arduino hardware";
|
|
|
|
homepage = http://inotool.org/;
|
2013-08-15 23:14:36 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ antono the-kenny ];
|
2013-10-08 11:05:19 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2012-11-28 02:55:24 +01:00
|
|
|
};
|
|
|
|
}
|